<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GDBusConnection</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="GIO 参考手册">
<link rel="up" href="gdbus-lowlevel.html" title="Lowlevel D-Bus Support">
<link rel="prev" href="gio-GDBusMessage.html" title="GDBusMessage">
<link rel="next" href="gio-GDBusMethodInvocation.html" title="GDBusMethodInvocation">
<meta name="generator" content="GTK-Doc V1.17 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="gio-GDBusMessage.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="gdbus-lowlevel.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GIO 参考手册</th>
<td><a accesskey="n" href="gio-GDBusMethodInvocation.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#gio-GDBusConnection.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#gio-GDBusConnection.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="gio-GDBusConnection"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gio-GDBusConnection.top_of_page"></a>GDBusConnection</span></h2>
<p>GDBusConnection — D-Bus Connections</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="gio-GDBusConnection.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;gio/gio.h&gt;

enum                <a class="link" href="gio-GDBusConnection.html#GBusType" title="enum GBusType">GBusType</a>;
<span class="returnvalue">void</span>                <a class="link" href="gio-GDBusConnection.html#g-bus-get" title="g_bus_get ()">g_bus_get</a>                           (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GBusType" title="enum GBusType"><span class="type">GBusType</span></a> bus_type</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GCancellable.html#GCancellable" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
<a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="returnvalue">GDBusConnection</span></a> *   <a class="link" href="gio-GDBusConnection.html#g-bus-get-finish" title="g_bus_get_finish ()">g_bus_get_finish</a>                    (<em class="parameter"><code><a class="link" href="gio-GAsyncResult.html#GAsyncResult" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *res</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="returnvalue">GDBusConnection</span></a> *   <a class="link" href="gio-GDBusConnection.html#g-bus-get-sync" title="g_bus_get_sync ()">g_bus_get_sync</a>                      (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GBusType" title="enum GBusType"><span class="type">GBusType</span></a> bus_type</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GCancellable.html#GCancellable" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
                    <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection">GDBusConnection</a>;
enum                <a class="link" href="gio-GDBusConnection.html#GDBusConnectionFlags" title="enum GDBusConnectionFlags">GDBusConnectionFlags</a>;
<span class="returnvalue">void</span>                <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-new" title="g_dbus_connection_new ()">g_dbus_connection_new</a>               (<em class="parameter"><code><a class="link" href="gio-GIOStream.html#GIOStream" title="GIOStream"><span class="type">GIOStream</span></a> *stream</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *guid</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnectionFlags" title="enum GDBusConnectionFlags"><span class="type">GDBusConnectionFlags</span></a> flags</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GDBusAuthObserver.html#GDBusAuthObserver" title="GDBusAuthObserver"><span class="type">GDBusAuthObserver</span></a> *observer</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GCancellable.html#GCancellable" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
<a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="returnvalue">GDBusConnection</span></a> *   <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-new-finish" title="g_dbus_connection_new_finish ()">g_dbus_connection_new_finish</a>        (<em class="parameter"><code><a class="link" href="gio-GAsyncResult.html#GAsyncResult" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *res</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="returnvalue">GDBusConnection</span></a> *   <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-new-sync" title="g_dbus_connection_new_sync ()">g_dbus_connection_new_sync</a>          (<em class="parameter"><code><a class="link" href="gio-GIOStream.html#GIOStream" title="GIOStream"><span class="type">GIOStream</span></a> *stream</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *guid</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnectionFlags" title="enum GDBusConnectionFlags"><span class="type">GDBusConnectionFlags</span></a> flags</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GDBusAuthObserver.html#GDBusAuthObserver" title="GDBusAuthObserver"><span class="type">GDBusAuthObserver</span></a> *observer</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GCancellable.html#GCancellable" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-new-for-address" title="g_dbus_connection_new_for_address ()">g_dbus_connection_new_for_address</a>   (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *address</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnectionFlags" title="enum GDBusConnectionFlags"><span class="type">GDBusConnectionFlags</span></a> flags</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GDBusAuthObserver.html#GDBusAuthObserver" title="GDBusAuthObserver"><span class="type">GDBusAuthObserver</span></a> *observer</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GCancellable.html#GCancellable" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
<a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="returnvalue">GDBusConnection</span></a> *   <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-new-for-address-finish" title="g_dbus_connection_new_for_address_finish ()">g_dbus_connection_new_for_address_finish</a>
                                                        (<em class="parameter"><code><a class="link" href="gio-GAsyncResult.html#GAsyncResult" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *res</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="returnvalue">GDBusConnection</span></a> *   <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-new-for-address-sync" title="g_dbus_connection_new_for_address_sync ()">g_dbus_connection_new_for_address_sync</a>
                                                        (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *address</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnectionFlags" title="enum GDBusConnectionFlags"><span class="type">GDBusConnectionFlags</span></a> flags</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GDBusAuthObserver.html#GDBusAuthObserver" title="GDBusAuthObserver"><span class="type">GDBusAuthObserver</span></a> *observer</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GCancellable.html#GCancellable" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-start-message-processing" title="g_dbus_connection_start_message_processing ()">g_dbus_connection_start_message_processing</a>
                                                        (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-close" title="g_dbus_connection_close ()">g_dbus_connection_close</a>             (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GCancellable.html#GCancellable" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-close-finish" title="g_dbus_connection_close_finish ()">g_dbus_connection_close_finish</a>      (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GAsyncResult.html#GAsyncResult" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *res</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-close-sync" title="g_dbus_connection_close_sync ()">g_dbus_connection_close_sync</a>        (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GCancellable.html#GCancellable" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-is-closed" title="g_dbus_connection_is_closed ()">g_dbus_connection_is_closed</a>         (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-flush" title="g_dbus_connection_flush ()">g_dbus_connection_flush</a>             (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GCancellable.html#GCancellable" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-flush-finish" title="g_dbus_connection_flush_finish ()">g_dbus_connection_flush_finish</a>      (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GAsyncResult.html#GAsyncResult" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *res</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-flush-sync" title="g_dbus_connection_flush_sync ()">g_dbus_connection_flush_sync</a>        (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GCancellable.html#GCancellable" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-get-exit-on-close" title="g_dbus_connection_get_exit_on_close ()">g_dbus_connection_get_exit_on_close</a> (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-set-exit-on-close" title="g_dbus_connection_set_exit_on_close ()">g_dbus_connection_set_exit_on_close</a> (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> exit_on_close</code></em>);
<a class="link" href="gio-GIOStream.html#GIOStream" title="GIOStream"><span class="returnvalue">GIOStream</span></a> *         <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-get-stream" title="g_dbus_connection_get_stream ()">g_dbus_connection_get_stream</a>        (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>);
const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *       <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-get-guid" title="g_dbus_connection_get_guid ()">g_dbus_connection_get_guid</a>          (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>);
const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *       <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-get-unique-name" title="g_dbus_connection_get_unique_name ()">g_dbus_connection_get_unique_name</a>   (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>);
enum                <a class="link" href="gio-GDBusConnection.html#GDBusCapabilityFlags" title="enum GDBusCapabilityFlags">GDBusCapabilityFlags</a>;
<a class="link" href="gio-GDBusConnection.html#GDBusCapabilityFlags" title="enum GDBusCapabilityFlags"><span class="returnvalue">GDBusCapabilityFlags</span></a>  <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-get-capabilities" title="g_dbus_connection_get_capabilities ()">g_dbus_connection_get_capabilities</a>
                                                        (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>);
<a class="link" href="gio-GCredentials.html#GCredentials" title="GCredentials"><span class="returnvalue">GCredentials</span></a> *      <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-get-peer-credentials" title="g_dbus_connection_get_peer_credentials ()">g_dbus_connection_get_peer_credentials</a>
                                                        (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>);
enum                <a class="link" href="gio-GDBusConnection.html#GDBusCallFlags" title="enum GDBusCallFlags">GDBusCallFlags</a>;
<span class="returnvalue">void</span>                <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-call" title="g_dbus_connection_call ()">g_dbus_connection_call</a>              (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *bus_name</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *object_path</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *interface_name</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *method_name</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *parameters</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-GVariantType.html#GVariantType"><span class="type">GVariantType</span></a> *reply_type</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusCallFlags" title="enum GDBusCallFlags"><span class="type">GDBusCallFlags</span></a> flags</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> timeout_msec</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GCancellable.html#GCancellable" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
<a href="../glib/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *          <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-call-finish" title="g_dbus_connection_call_finish ()">g_dbus_connection_call_finish</a>       (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GAsyncResult.html#GAsyncResult" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *res</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<a href="../glib/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *          <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-call-sync" title="g_dbus_connection_call_sync ()">g_dbus_connection_call_sync</a>         (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *bus_name</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *object_path</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *interface_name</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *method_name</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *parameters</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-GVariantType.html#GVariantType"><span class="type">GVariantType</span></a> *reply_type</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusCallFlags" title="enum GDBusCallFlags"><span class="type">GDBusCallFlags</span></a> flags</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> timeout_msec</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GCancellable.html#GCancellable" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-emit-signal" title="g_dbus_connection_emit_signal ()">g_dbus_connection_emit_signal</a>       (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *destination_bus_name</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *object_path</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *interface_name</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *signal_name</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *parameters</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
enum                <a class="link" href="gio-GDBusConnection.html#GDBusSignalFlags" title="enum GDBusSignalFlags">GDBusSignalFlags</a>;
<span class="returnvalue">void</span>                (<a class="link" href="gio-GDBusConnection.html#GDBusSignalCallback" title="GDBusSignalCallback ()">*GDBusSignalCallback</a>)              (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *sender_name</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *object_path</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *interface_name</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *signal_name</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *parameters</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
<a href="../glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-signal-subscribe" title="g_dbus_connection_signal_subscribe ()">g_dbus_connection_signal_subscribe</a>  (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *sender</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *interface_name</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *member</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *object_path</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *arg0</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusSignalFlags" title="enum GDBusSignalFlags"><span class="type">GDBusSignalFlags</span></a> flags</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusSignalCallback" title="GDBusSignalCallback ()"><span class="type">GDBusSignalCallback</span></a> callback</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> user_data_free_func</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-signal-unsubscribe" title="g_dbus_connection_signal_unsubscribe ()">g_dbus_connection_signal_unsubscribe</a>
                                                        (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> subscription_id</code></em>);
enum                <a class="link" href="gio-GDBusConnection.html#GDBusSendMessageFlags" title="enum GDBusSendMessageFlags">GDBusSendMessageFlags</a>;
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-send-message" title="g_dbus_connection_send_message ()">g_dbus_connection_send_message</a>      (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GDBusMessage.html#GDBusMessage" title="GDBusMessage"><span class="type">GDBusMessage</span></a> *message</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusSendMessageFlags" title="enum GDBusSendMessageFlags"><span class="type">GDBusSendMessageFlags</span></a> flags</code></em>,
                                                         <em class="parameter"><code>volatile <a href="../glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> *out_serial</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-send-message-with-reply" title="g_dbus_connection_send_message_with_reply ()">g_dbus_connection_send_message_with_reply</a>
                                                        (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GDBusMessage.html#GDBusMessage" title="GDBusMessage"><span class="type">GDBusMessage</span></a> *message</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusSendMessageFlags" title="enum GDBusSendMessageFlags"><span class="type">GDBusSendMessageFlags</span></a> flags</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> timeout_msec</code></em>,
                                                         <em class="parameter"><code>volatile <a href="../glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> *out_serial</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GCancellable.html#GCancellable" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
<a class="link" href="gio-GDBusMessage.html#GDBusMessage" title="GDBusMessage"><span class="returnvalue">GDBusMessage</span></a> *      <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-send-message-with-reply-finish" title="g_dbus_connection_send_message_with_reply_finish ()">g_dbus_connection_send_message_with_reply_finish</a>
                                                        (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GAsyncResult.html#GAsyncResult" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *res</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<a class="link" href="gio-GDBusMessage.html#GDBusMessage" title="GDBusMessage"><span class="returnvalue">GDBusMessage</span></a> *      <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-send-message-with-reply-sync" title="g_dbus_connection_send_message_with_reply_sync ()">g_dbus_connection_send_message_with_reply_sync</a>
                                                        (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GDBusMessage.html#GDBusMessage" title="GDBusMessage"><span class="type">GDBusMessage</span></a> *message</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusSendMessageFlags" title="enum GDBusSendMessageFlags"><span class="type">GDBusSendMessageFlags</span></a> flags</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> timeout_msec</code></em>,
                                                         <em class="parameter"><code>volatile <a href="../glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> *out_serial</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GCancellable.html#GCancellable" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<a class="link" href="gio-GDBusMessage.html#GDBusMessage" title="GDBusMessage"><span class="returnvalue">GDBusMessage</span></a> *      (<a class="link" href="gio-GDBusConnection.html#GDBusMessageFilterFunction" title="GDBusMessageFilterFunction ()">*GDBusMessageFilterFunction</a>)       (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GDBusMessage.html#GDBusMessage" title="GDBusMessage"><span class="type">GDBusMessage</span></a> *message</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> incoming</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
<a href="../glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-add-filter" title="g_dbus_connection_add_filter ()">g_dbus_connection_add_filter</a>        (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusMessageFilterFunction" title="GDBusMessageFilterFunction ()"><span class="type">GDBusMessageFilterFunction</span></a> filter_function</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> user_data_free_func</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-remove-filter" title="g_dbus_connection_remove_filter ()">g_dbus_connection_remove_filter</a>     (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> filter_id</code></em>);
                    <a class="link" href="gio-GDBusConnection.html#GDBusInterfaceVTable" title="GDBusInterfaceVTable">GDBusInterfaceVTable</a>;
<span class="returnvalue">void</span>                (<a class="link" href="gio-GDBusConnection.html#GDBusInterfaceMethodCallFunc" title="GDBusInterfaceMethodCallFunc ()">*GDBusInterfaceMethodCallFunc</a>)     (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *sender</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *object_path</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *interface_name</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *method_name</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *parameters</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a> *invocation</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
<a href="../glib/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *          (<a class="link" href="gio-GDBusConnection.html#GDBusInterfaceGetPropertyFunc" title="GDBusInterfaceGetPropertyFunc ()">*GDBusInterfaceGetPropertyFunc</a>)    (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *sender</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *object_path</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *interface_name</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *property_name</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            (<a class="link" href="gio-GDBusConnection.html#GDBusInterfaceSetPropertyFunc" title="GDBusInterfaceSetPropertyFunc ()">*GDBusInterfaceSetPropertyFunc</a>)    (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *sender</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *object_path</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *interface_name</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *property_name</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *value</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
<a href="../glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-register-object" title="g_dbus_connection_register_object ()">g_dbus_connection_register_object</a>   (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *object_path</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-D-Bus-Introspection-Data.html#GDBusInterfaceInfo" title="GDBusInterfaceInfo"><span class="type">GDBusInterfaceInfo</span></a> *interface_info</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="gio-GDBusConnection.html#GDBusInterfaceVTable" title="GDBusInterfaceVTable"><span class="type">GDBusInterfaceVTable</span></a> *vtable</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> user_data_free_func</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-unregister-object" title="g_dbus_connection_unregister_object ()">g_dbus_connection_unregister_object</a> (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> registration_id</code></em>);
                    <a class="link" href="gio-GDBusConnection.html#GDBusSubtreeVTable" title="GDBusSubtreeVTable">GDBusSubtreeVTable</a>;
<a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> **            (<a class="link" href="gio-GDBusConnection.html#GDBusSubtreeEnumerateFunc" title="GDBusSubtreeEnumerateFunc ()">*GDBusSubtreeEnumerateFunc</a>)        (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *sender</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *object_path</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
<a class="link" href="gio-D-Bus-Introspection-Data.html#GDBusInterfaceInfo" title="GDBusInterfaceInfo"><span class="returnvalue">GDBusInterfaceInfo</span></a> ** (<a class="link" href="gio-GDBusConnection.html#GDBusSubtreeIntrospectFunc" title="GDBusSubtreeIntrospectFunc ()">*GDBusSubtreeIntrospectFunc</a>)     (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *sender</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *object_path</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *node</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
const <a class="link" href="gio-GDBusConnection.html#GDBusInterfaceVTable" title="GDBusInterfaceVTable"><span class="returnvalue">GDBusInterfaceVTable</span></a> * (<a class="link" href="gio-GDBusConnection.html#GDBusSubtreeDispatchFunc" title="GDBusSubtreeDispatchFunc ()">*GDBusSubtreeDispatchFunc</a>)
                                                        (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *sender</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *object_path</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *interface_name</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *node</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> *out_user_data</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
enum                <a class="link" href="gio-GDBusConnection.html#GDBusSubtreeFlags" title="enum GDBusSubtreeFlags">GDBusSubtreeFlags</a>;
<a href="../glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-register-subtree" title="g_dbus_connection_register_subtree ()">g_dbus_connection_register_subtree</a>  (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *object_path</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="gio-GDBusConnection.html#GDBusSubtreeVTable" title="GDBusSubtreeVTable"><span class="type">GDBusSubtreeVTable</span></a> *vtable</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusSubtreeFlags" title="enum GDBusSubtreeFlags"><span class="type">GDBusSubtreeFlags</span></a> flags</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> user_data_free_func</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-unregister-subtree" title="g_dbus_connection_unregister_subtree ()">g_dbus_connection_unregister_subtree</a>
                                                        (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> registration_id</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="gio-GDBusConnection.description"></a><h2>Description</h2>
<p>
The <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> type is used for D-Bus connections to remote
peers such as a message buses. It is a low-level API that offers a
lot of flexibility. For instance, it lets you establish a connection
over any transport that can by represented as an <a class="link" href="gio-GIOStream.html#GIOStream" title="GIOStream"><span class="type">GIOStream</span></a>.
</p>
<p>
This class is rarely used directly in D-Bus clients. If you are writing
an D-Bus client, it is often easier to use the <a class="link" href="gio-Owning-Bus-Names.html#g-bus-own-name" title="g_bus_own_name ()"><code class="function">g_bus_own_name()</code></a>,
<a class="link" href="gio-Watching-Bus-Names.html#g-bus-watch-name" title="g_bus_watch_name ()"><code class="function">g_bus_watch_name()</code></a> or <a class="link" href="gio-GDBusProxy.html#g-dbus-proxy-new-for-bus" title="g_dbus_proxy_new_for_bus ()"><code class="function">g_dbus_proxy_new_for_bus()</code></a> APIs.
</p>
<p>
</p>
<div class="example">
<a name="gdbus-server"></a><p class="title"><b>Example 2. D-Bus server example</b></p>
<div class="example-contents"><pre class="programlisting">#include &lt;gio/gio.h&gt;
#include &lt;stdlib.h&gt;

#ifdef G_OS_UNIX
#include &lt;gio/gunixfdlist.h&gt;
/* For STDOUT_FILENO */
#include &lt;unistd.h&gt;
#endif

/* ---------------------------------------------------------------------------------------------------- */

static GDBusNodeInfo *introspection_data = NULL;

/* Introspection data for the service we are exporting */
static const gchar introspection_xml[] =
  "&lt;node&gt;"
  "  &lt;interface name='org.gtk.GDBus.TestInterface'&gt;"
  "    &lt;annotation name='org.gtk.GDBus.Annotation' value='OnInterface'/&gt;"
  "    &lt;annotation name='org.gtk.GDBus.Annotation' value='AlsoOnInterface'/&gt;"
  "    &lt;method name='HelloWorld'&gt;"
  "      &lt;annotation name='org.gtk.GDBus.Annotation' value='OnMethod'/&gt;"
  "      &lt;arg type='s' name='greeting' direction='in'/&gt;"
  "      &lt;arg type='s' name='response' direction='out'/&gt;"
  "    &lt;/method&gt;"
  "    &lt;method name='EmitSignal'&gt;"
  "      &lt;arg type='d' name='speed_in_mph' direction='in'&gt;"
  "        &lt;annotation name='org.gtk.GDBus.Annotation' value='OnArg'/&gt;"
  "      &lt;/arg&gt;"
  "    &lt;/method&gt;"
  "    &lt;method name='GimmeStdout'/&gt;"
  "    &lt;signal name='VelocityChanged'&gt;"
  "      &lt;annotation name='org.gtk.GDBus.Annotation' value='Onsignal'/&gt;"
  "      &lt;arg type='d' name='speed_in_mph'/&gt;"
  "      &lt;arg type='s' name='speed_as_string'&gt;"
  "        &lt;annotation name='org.gtk.GDBus.Annotation' value='OnArg_NonFirst'/&gt;"
  "      &lt;/arg&gt;"
  "    &lt;/signal&gt;"
  "    &lt;property type='s' name='FluxCapicitorName' access='read'&gt;"
  "      &lt;annotation name='org.gtk.GDBus.Annotation' value='OnProperty'&gt;"
  "        &lt;annotation name='org.gtk.GDBus.Annotation' value='OnAnnotation_YesThisIsCrazy'/&gt;"
  "      &lt;/annotation&gt;"
  "    &lt;/property&gt;"
  "    &lt;property type='s' name='Title' access='readwrite'/&gt;"
  "    &lt;property type='s' name='ReadingAlwaysThrowsError' access='read'/&gt;"
  "    &lt;property type='s' name='WritingAlwaysThrowsError' access='readwrite'/&gt;"
  "    &lt;property type='s' name='OnlyWritable' access='write'/&gt;"
  "    &lt;property type='s' name='Foo' access='read'/&gt;"
  "    &lt;property type='s' name='Bar' access='read'/&gt;"
  "  &lt;/interface&gt;"
  "&lt;/node&gt;";

/* ---------------------------------------------------------------------------------------------------- */

static void
handle_method_call (GDBusConnection       *connection,
                    const gchar           *sender,
                    const gchar           *object_path,
                    const gchar           *interface_name,
                    const gchar           *method_name,
                    GVariant              *parameters,
                    GDBusMethodInvocation *invocation,
                    gpointer               user_data)
{
  if (g_strcmp0 (method_name, "HelloWorld") == 0)
    {
      const gchar *greeting;

      g_variant_get (parameters, "(&amp;s)", &amp;greeting);

      if (g_strcmp0 (greeting, "Return Unregistered") == 0)
        {
          g_dbus_method_invocation_return_error (invocation,
                                                 G_IO_ERROR,
                                                 G_IO_ERROR_FAILED_HANDLED,
                                                 "As requested, here's a GError not registered (G_IO_ERROR_FAILED_HANDLED)");
        }
      else if (g_strcmp0 (greeting, "Return Registered") == 0)
        {
          g_dbus_method_invocation_return_error (invocation,
                                                 G_DBUS_ERROR,
                                                 G_DBUS_ERROR_MATCH_RULE_NOT_FOUND,
                                                 "As requested, here's a GError that is registered (G_DBUS_ERROR_MATCH_RULE_NOT_FOUND)");
        }
      else if (g_strcmp0 (greeting, "Return Raw") == 0)
        {
          g_dbus_method_invocation_return_dbus_error (invocation,
                                                      "org.gtk.GDBus.SomeErrorName",
                                                      "As requested, here's a raw D-Bus error");
        }
      else
        {
          gchar *response;
          response = g_strdup_printf ("You greeted me with '%s'. Thanks!", greeting);
          g_dbus_method_invocation_return_value (invocation,
                                                 g_variant_new ("(s)", response));
          g_free (response);
        }
    }
  else if (g_strcmp0 (method_name, "EmitSignal") == 0)
    {
      GError *local_error;
      gdouble speed_in_mph;
      gchar *speed_as_string;

      g_variant_get (parameters, "(d)", &amp;speed_in_mph);
      speed_as_string = g_strdup_printf ("%g mph!", speed_in_mph);

      local_error = NULL;
      g_dbus_connection_emit_signal (connection,
                                     NULL,
                                     object_path,
                                     interface_name,
                                     "VelocityChanged",
                                     g_variant_new ("(ds)",
                                                    speed_in_mph,
                                                    speed_as_string),
                                     &amp;local_error);
      g_assert_no_error (local_error);
      g_free (speed_as_string);

      g_dbus_method_invocation_return_value (invocation, NULL);
    }
  else if (g_strcmp0 (method_name, "GimmeStdout") == 0)
    {
#ifdef G_OS_UNIX
      if (g_dbus_connection_get_capabilities (connection) &amp; G_DBUS_CAPABILITY_FLAGS_UNIX_FD_PASSING)
        {
          GDBusMessage *reply;
          GUnixFDList *fd_list;
          GError *error;

          fd_list = g_unix_fd_list_new ();
          error = NULL;
          g_unix_fd_list_append (fd_list, STDOUT_FILENO, &amp;error);
          g_assert_no_error (error);

          reply = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
          g_dbus_message_set_unix_fd_list (reply, fd_list);

          error = NULL;
          g_dbus_connection_send_message (connection,
                                          reply,
                                          G_DBUS_SEND_MESSAGE_FLAGS_NONE,
                                          NULL, /* out_serial */
                                          &amp;error);
          g_assert_no_error (error);

          g_object_unref (invocation);
          g_object_unref (fd_list);
          g_object_unref (reply);
        }
      else
        {
          g_dbus_method_invocation_return_dbus_error (invocation,
                                                      "org.gtk.GDBus.Failed",
                                                      "Your message bus daemon does not support file descriptor passing (need D-Bus &gt;= 1.3.0)");
        }
#else
      g_dbus_method_invocation_return_dbus_error (invocation,
                                                  "org.gtk.GDBus.NotOnUnix",
                                                  "Your OS does not support file descriptor passing");
#endif
    }
}

static gchar *_global_title = NULL;

static gboolean swap_a_and_b = FALSE;

static GVariant *
handle_get_property (GDBusConnection  *connection,
                     const gchar      *sender,
                     const gchar      *object_path,
                     const gchar      *interface_name,
                     const gchar      *property_name,
                     GError          **error,
                     gpointer          user_data)
{
  GVariant *ret;

  ret = NULL;
  if (g_strcmp0 (property_name, "FluxCapicitorName") == 0)
    {
      ret = g_variant_new_string ("DeLorean");
    }
  else if (g_strcmp0 (property_name, "Title") == 0)
    {
      if (_global_title == NULL)
        _global_title = g_strdup ("Back To C!");
      ret = g_variant_new_string (_global_title);
    }
  else if (g_strcmp0 (property_name, "ReadingAlwaysThrowsError") == 0)
    {
      g_set_error (error,
                   G_IO_ERROR,
                   G_IO_ERROR_FAILED,
                   "Hello %s. I thought I said reading this property "
                   "always results in an error. kthxbye",
                   sender);
    }
  else if (g_strcmp0 (property_name, "WritingAlwaysThrowsError") == 0)
    {
      ret = g_variant_new_string ("There's no home like home");
    }
  else if (g_strcmp0 (property_name, "Foo") == 0)
    {
      ret = g_variant_new_string (swap_a_and_b ? "Tock" : "Tick");
    }
  else if (g_strcmp0 (property_name, "Bar") == 0)
    {
      ret = g_variant_new_string (swap_a_and_b ? "Tick" : "Tock");
    }

  return ret;
}

static gboolean
handle_set_property (GDBusConnection  *connection,
                     const gchar      *sender,
                     const gchar      *object_path,
                     const gchar      *interface_name,
                     const gchar      *property_name,
                     GVariant         *value,
                     GError          **error,
                     gpointer          user_data)
{
  if (g_strcmp0 (property_name, "Title") == 0)
    {
      if (g_strcmp0 (_global_title, g_variant_get_string (value, NULL)) != 0)
        {
          GVariantBuilder *builder;
          GError *local_error;

          g_free (_global_title);
          _global_title = g_variant_dup_string (value, NULL);

          local_error = NULL;
          builder = g_variant_builder_new (G_VARIANT_TYPE_ARRAY);
          g_variant_builder_add (builder,
                                 "{sv}",
                                 "Title",
                                 g_variant_new_string (_global_title));
          g_dbus_connection_emit_signal (connection,
                                         NULL,
                                         object_path,
                                         "org.freedesktop.DBus.Properties",
                                         "PropertiesChanged",
                                         g_variant_new ("(sa{sv}as)",
                                                        interface_name,
                                                        builder,
                                                        NULL),
                                         &amp;local_error);
          g_assert_no_error (local_error);
        }
    }
  else if (g_strcmp0 (property_name, "ReadingAlwaysThrowsError") == 0)
    {
      /* do nothing - they can't read it after all! */
    }
  else if (g_strcmp0 (property_name, "WritingAlwaysThrowsError") == 0)
    {
      g_set_error (error,
                   G_IO_ERROR,
                   G_IO_ERROR_FAILED,
                   "Hello AGAIN %s. I thought I said writing this property "
                   "always results in an error. kthxbye",
                   sender);
    }

  return *error == NULL;
}


/* for now */
static const GDBusInterfaceVTable interface_vtable =
{
  handle_method_call,
  handle_get_property,
  handle_set_property
};

/* ---------------------------------------------------------------------------------------------------- */

static gboolean
on_timeout_cb (gpointer user_data)
{
  GDBusConnection *connection = G_DBUS_CONNECTION (user_data);
  GVariantBuilder *builder;
  GVariantBuilder *invalidated_builder;
  GError *error;

  swap_a_and_b = !swap_a_and_b;

  error = NULL;
  builder = g_variant_builder_new (G_VARIANT_TYPE_ARRAY);
  invalidated_builder = g_variant_builder_new (G_VARIANT_TYPE ("as"));
  g_variant_builder_add (builder,
                         "{sv}",
                         "Foo",
                         g_variant_new_string (swap_a_and_b ? "Tock" : "Tick"));
  g_variant_builder_add (builder,
                         "{sv}",
                         "Bar",
                         g_variant_new_string (swap_a_and_b ? "Tick" : "Tock"));
  g_dbus_connection_emit_signal (connection,
                                 NULL,
                                 "/org/gtk/GDBus/TestObject",
                                 "org.freedesktop.DBus.Properties",
                                 "PropertiesChanged",
                                 g_variant_new ("(sa{sv}as)",
                                                "org.gtk.GDBus.TestInterface",
                                                builder,
                                                invalidated_builder),
                                 &amp;error);
  g_assert_no_error (error);


  return TRUE;
}

/* ---------------------------------------------------------------------------------------------------- */

static void
on_bus_acquired (GDBusConnection *connection,
                 const gchar     *name,
                 gpointer         user_data)
{
  guint registration_id;

  registration_id = g_dbus_connection_register_object (connection,
                                                       "/org/gtk/GDBus/TestObject",
                                                       introspection_data-&gt;interfaces[0],
                                                       &amp;interface_vtable,
                                                       NULL,  /* user_data */
                                                       NULL,  /* user_data_free_func */
                                                       NULL); /* GError** */
  g_assert (registration_id &gt; 0);

  /* swap value of properties Foo and Bar every two seconds */
  g_timeout_add_seconds (2,
                         on_timeout_cb,
                         connection);
}

static void
on_name_acquired (GDBusConnection *connection,
                  const gchar     *name,
                  gpointer         user_data)
{
}

static void
on_name_lost (GDBusConnection *connection,
              const gchar     *name,
              gpointer         user_data)
{
  exit (1);
}

int
main (int argc, char *argv[])
{
  guint owner_id;
  GMainLoop *loop;

  g_type_init ();

  /* We are lazy here - we don't want to manually provide
   * the introspection data structures - so we just build
   * them from XML.
   */
  introspection_data = g_dbus_node_info_new_for_xml (introspection_xml, NULL);
  g_assert (introspection_data != NULL);

  owner_id = g_bus_own_name (G_BUS_TYPE_SESSION,
                             "org.gtk.GDBus.TestServer",
                             G_BUS_NAME_OWNER_FLAGS_NONE,
                             on_bus_acquired,
                             on_name_acquired,
                             on_name_lost,
                             NULL,
                             NULL);

  loop = g_main_loop_new (NULL, FALSE);
  g_main_loop_run (loop);

  g_bus_unown_name (owner_id);

  g_dbus_node_info_unref (introspection_data);

  return 0;
}
</pre></div>
</div>
<p><br class="example-break">
</p>
<p>
</p>
<div class="example">
<a name="gdbus-subtree-server"></a><p class="title"><b>Example 3. D-Bus subtree example</b></p>
<div class="example-contents"><pre class="programlisting">#include &lt;gio/gio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;string.h&gt;

/* ---------------------------------------------------------------------------------------------------- */

static GDBusNodeInfo *introspection_data = NULL;
static GDBusInterfaceInfo *manager_interface_info = NULL;
static GDBusInterfaceInfo *block_interface_info = NULL;
static GDBusInterfaceInfo *partition_interface_info = NULL;

/* Introspection data for the service we are exporting */
static const gchar introspection_xml[] =
  "&lt;node&gt;"
  "  &lt;interface name='org.gtk.GDBus.Example.Manager'&gt;"
  "    &lt;method name='Hello'&gt;"
  "      &lt;arg type='s' name='greeting' direction='in'/&gt;"
  "      &lt;arg type='s' name='response' direction='out'/&gt;"
  "    &lt;/method&gt;"
  "  &lt;/interface&gt;"
  "  &lt;interface name='org.gtk.GDBus.Example.Block'&gt;"
  "    &lt;method name='Hello'&gt;"
  "      &lt;arg type='s' name='greeting' direction='in'/&gt;"
  "      &lt;arg type='s' name='response' direction='out'/&gt;"
  "    &lt;/method&gt;"
  "    &lt;property type='i' name='Major' access='read'/&gt;"
  "    &lt;property type='i' name='Minor' access='read'/&gt;"
  "    &lt;property type='s' name='Notes' access='readwrite'/&gt;"
  "  &lt;/interface&gt;"
  "  &lt;interface name='org.gtk.GDBus.Example.Partition'&gt;"
  "    &lt;method name='Hello'&gt;"
  "      &lt;arg type='s' name='greeting' direction='in'/&gt;"
  "      &lt;arg type='s' name='response' direction='out'/&gt;"
  "    &lt;/method&gt;"
  "    &lt;property type='i' name='PartitionNumber' access='read'/&gt;"
  "    &lt;property type='s' name='Notes' access='readwrite'/&gt;"
  "  &lt;/interface&gt;"
  "&lt;/node&gt;";

/* ---------------------------------------------------------------------------------------------------- */

static void
manager_method_call (GDBusConnection       *connection,
                     const gchar           *sender,
                     const gchar           *object_path,
                     const gchar           *interface_name,
                     const gchar           *method_name,
                     GVariant              *parameters,
                     GDBusMethodInvocation *invocation,
                     gpointer               user_data)
{
  const gchar *greeting;
  gchar *response;

  g_assert_cmpstr (interface_name, ==, "org.gtk.GDBus.Example.Manager");
  g_assert_cmpstr (method_name, ==, "Hello");

  g_variant_get (parameters, "(&amp;s)", &amp;greeting);

  response = g_strdup_printf ("Method %s.%s with user_data `%s' on object path %s called with arg '%s'",
                              interface_name,
                              method_name,
                              (const gchar *) user_data,
                              object_path,
                              greeting);
  g_dbus_method_invocation_return_value (invocation,
                                         g_variant_new ("(s)", response));
  g_free (response);
}

const GDBusInterfaceVTable manager_vtable =
{
  manager_method_call,
  NULL,                 /* get_property */
  NULL                  /* set_property */
};

/* ---------------------------------------------------------------------------------------------------- */

static void
block_method_call (GDBusConnection       *connection,
                   const gchar           *sender,
                   const gchar           *object_path,
                   const gchar           *interface_name,
                   const gchar           *method_name,
                   GVariant              *parameters,
                   GDBusMethodInvocation *invocation,
                   gpointer               user_data)
{
  g_assert_cmpstr (interface_name, ==, "org.gtk.GDBus.Example.Block");

  if (g_strcmp0 (method_name, "Hello") == 0)
    {
      const gchar *greeting;
      gchar *response;

      g_variant_get (parameters, "(&amp;s)", &amp;greeting);

      response = g_strdup_printf ("Method %s.%s with user_data `%s' on object path %s called with arg '%s'",
                                  interface_name,
                                  method_name,
                                  (const gchar *) user_data,
                                  object_path,
                                  greeting);
      g_dbus_method_invocation_return_value (invocation,
                                             g_variant_new ("(s)", response));
      g_free (response);
    }
  else if (g_strcmp0 (method_name, "DoStuff") == 0)
    {
      g_dbus_method_invocation_return_dbus_error (invocation,
                                                  "org.gtk.GDBus.TestSubtree.Error.Failed",
                                                  "This method intentionally always fails");
    }
  else
    {
      g_assert_not_reached ();
    }
}

static GVariant *
block_get_property (GDBusConnection  *connection,
                    const gchar      *sender,
                    const gchar      *object_path,
                    const gchar      *interface_name,
                    const gchar      *property_name,
                    GError          **error,
                    gpointer          user_data)
{
  GVariant *ret;
  const gchar *node;
  gint major;
  gint minor;

  node = strrchr (object_path, '/') + 1;
  if (g_str_has_prefix (node, "sda"))
    major = 8;
  else
    major = 9;
  if (strlen (node) == 4)
    minor = node[3] - '0';
  else
    minor = 0;

  ret = NULL;
  if (g_strcmp0 (property_name, "Major") == 0)
    {
      ret = g_variant_new_int32 (major);
    }
  else if (g_strcmp0 (property_name, "Minor") == 0)
    {
      ret = g_variant_new_int32 (minor);
    }
  else if (g_strcmp0 (property_name, "Notes") == 0)
    {
      g_set_error (error,
                   G_IO_ERROR,
                   G_IO_ERROR_FAILED,
                   "Hello %s. I thought I said reading this property "
                   "always results in an error. kthxbye",
                   sender);
    }
  else
    {
      g_assert_not_reached ();
    }

  return ret;
}

static gboolean
block_set_property (GDBusConnection  *connection,
                    const gchar      *sender,
                    const gchar      *object_path,
                    const gchar      *interface_name,
                    const gchar      *property_name,
                    GVariant         *value,
                    GError          **error,
                    gpointer          user_data)
{
  /* TODO */
  g_assert_not_reached ();
}

const GDBusInterfaceVTable block_vtable =
{
  block_method_call,
  block_get_property,
  block_set_property,
};

/* ---------------------------------------------------------------------------------------------------- */

static void
partition_method_call (GDBusConnection       *connection,
                       const gchar           *sender,
                       const gchar           *object_path,
                       const gchar           *interface_name,
                       const gchar           *method_name,
                       GVariant              *parameters,
                       GDBusMethodInvocation *invocation,
                       gpointer               user_data)
{
  const gchar *greeting;
  gchar *response;

  g_assert_cmpstr (interface_name, ==, "org.gtk.GDBus.Example.Partition");
  g_assert_cmpstr (method_name, ==, "Hello");

  g_variant_get (parameters, "(&amp;s)", &amp;greeting);

  response = g_strdup_printf ("Method %s.%s with user_data `%s' on object path %s called with arg '%s'",
                              interface_name,
                              method_name,
                              (const gchar *) user_data,
                              object_path,
                              greeting);
  g_dbus_method_invocation_return_value (invocation,
                                         g_variant_new ("(s)", response));
  g_free (response);
}

const GDBusInterfaceVTable partition_vtable =
{
  partition_method_call,
  //partition_get_property,
  //partition_set_property
};

/* ---------------------------------------------------------------------------------------------------- */

static gchar **
subtree_enumerate (GDBusConnection       *connection,
                   const gchar           *sender,
                   const gchar           *object_path,
                   gpointer               user_data)
{
  gchar **nodes;
  GPtrArray *p;

  p = g_ptr_array_new ();
  g_ptr_array_add (p, g_strdup ("sda"));
  g_ptr_array_add (p, g_strdup ("sda1"));
  g_ptr_array_add (p, g_strdup ("sda2"));
  g_ptr_array_add (p, g_strdup ("sda3"));
  g_ptr_array_add (p, g_strdup ("sdb"));
  g_ptr_array_add (p, g_strdup ("sdb1"));
  g_ptr_array_add (p, g_strdup ("sdc"));
  g_ptr_array_add (p, g_strdup ("sdc1"));
  g_ptr_array_add (p, NULL);
  nodes = (gchar **) g_ptr_array_free (p, FALSE);

  return nodes;
}

static GDBusInterfaceInfo **
subtree_introspect (GDBusConnection       *connection,
                    const gchar           *sender,
                    const gchar           *object_path,
                    const gchar           *node,
                    gpointer               user_data)
{
  GPtrArray *p;

  p = g_ptr_array_new ();
  if (node == NULL)
    {
      g_ptr_array_add (p, g_dbus_interface_info_ref (manager_interface_info));
    }
  else
    {
      g_ptr_array_add (p, g_dbus_interface_info_ref (block_interface_info));
      if (strlen (node) == 4)
        g_ptr_array_add (p,
                         g_dbus_interface_info_ref (partition_interface_info));
    }

  g_ptr_array_add (p, NULL);

  return (GDBusInterfaceInfo **) g_ptr_array_free (p, FALSE);
}

static const GDBusInterfaceVTable *
subtree_dispatch (GDBusConnection             *connection,
                  const gchar                 *sender,
                  const gchar                 *object_path,
                  const gchar                 *interface_name,
                  const gchar                 *node,
                  gpointer                    *out_user_data,
                  gpointer                     user_data)
{
  const GDBusInterfaceVTable *vtable_to_return;
  gpointer user_data_to_return;

  if (g_strcmp0 (interface_name, "org.gtk.GDBus.Example.Manager") == 0)
    {
      user_data_to_return = "The Root";
      vtable_to_return = &amp;manager_vtable;
    }
  else
    {
      if (strlen (node) == 4)
        user_data_to_return = "A partition";
      else
        user_data_to_return = "A block device";

      if (g_strcmp0 (interface_name, "org.gtk.GDBus.Example.Block") == 0)
        vtable_to_return = &amp;block_vtable;
      else if (g_strcmp0 (interface_name, "org.gtk.GDBus.Example.Partition") == 0)
        vtable_to_return = &amp;partition_vtable;
      else
        g_assert_not_reached ();
    }

  *out_user_data = user_data_to_return;

  return vtable_to_return;
}

const GDBusSubtreeVTable subtree_vtable =
{
  subtree_enumerate,
  subtree_introspect,
  subtree_dispatch
};

/* ---------------------------------------------------------------------------------------------------- */

static void
on_bus_acquired (GDBusConnection *connection,
                 const gchar     *name,
                 gpointer         user_data)
{
  guint registration_id;

  registration_id = g_dbus_connection_register_subtree (connection,
                                                        "/org/gtk/GDBus/TestSubtree/Devices",
                                                        &amp;subtree_vtable,
                                                        G_DBUS_SUBTREE_FLAGS_NONE,
                                                        NULL,  /* user_data */
                                                        NULL,  /* user_data_free_func */
                                                        NULL); /* GError** */
  g_assert (registration_id &gt; 0);
}

static void
on_name_acquired (GDBusConnection *connection,
                  const gchar     *name,
                  gpointer         user_data)
{
}

static void
on_name_lost (GDBusConnection *connection,
              const gchar     *name,
              gpointer         user_data)
{
  exit (1);
}

int
main (int argc, char *argv[])
{
  guint owner_id;
  GMainLoop *loop;

  g_type_init ();

  /* We are lazy here - we don't want to manually provide
   * the introspection data structures - so we just build
   * them from XML.
   */
  introspection_data = g_dbus_node_info_new_for_xml (introspection_xml, NULL);
  g_assert (introspection_data != NULL);

  manager_interface_info = g_dbus_node_info_lookup_interface (introspection_data, "org.gtk.GDBus.Example.Manager");
  block_interface_info = g_dbus_node_info_lookup_interface (introspection_data, "org.gtk.GDBus.Example.Block");
  partition_interface_info = g_dbus_node_info_lookup_interface (introspection_data, "org.gtk.GDBus.Example.Partition");
  g_assert (manager_interface_info != NULL);
  g_assert (block_interface_info != NULL);
  g_assert (partition_interface_info != NULL);

  owner_id = g_bus_own_name (G_BUS_TYPE_SESSION,
                             "org.gtk.GDBus.TestSubtree",
                             G_BUS_NAME_OWNER_FLAGS_NONE,
                             on_bus_acquired,
                             on_name_acquired,
                             on_name_lost,
                             NULL,
                             NULL);

  loop = g_main_loop_new (NULL, FALSE);
  g_main_loop_run (loop);

  g_bus_unown_name (owner_id);

  g_dbus_node_info_unref (introspection_data);

  return 0;
}
</pre></div>
</div>
<p><br class="example-break">
</p>
<p>
</p>
<div class="example">
<a name="gdbus-unix-fd-client"></a><p class="title"><b>Example 4. D-Bus UNIX File Descriptor example</b></p>
<div class="example-contents"><pre class="programlisting">#include &lt;string.h&gt;
#include &lt;stdlib.h&gt;

#include &lt;sys/types.h&gt;
#include &lt;unistd.h&gt;

#include &lt;time.h&gt;

#include &lt;gio/gio.h&gt;
#include &lt;gio/gunixfdlist.h&gt;

/* see gdbus-example-server.c for the server implementation */
static gint
get_server_stdout (GDBusConnection  *connection,
                   const gchar      *name_owner,
                   GError          **error)
{
  GDBusMessage *method_call_message;
  GDBusMessage *method_reply_message;
  GUnixFDList *fd_list;
  gint fd;

  fd = -1;
  method_call_message = NULL;
  method_reply_message = NULL;

  method_call_message = g_dbus_message_new_method_call (name_owner,
                                                        "/org/gtk/GDBus/TestObject",
                                                        "org.gtk.GDBus.TestInterface",
                                                        "GimmeStdout");
  method_reply_message = g_dbus_connection_send_message_with_reply_sync (connection,
                                                                         method_call_message,
                                                                         G_DBUS_SEND_MESSAGE_FLAGS_NONE,
                                                                         -1,
                                                                         NULL, /* out_serial */
                                                                         NULL, /* cancellable */
                                                                         error);
  if (method_reply_message == NULL)
      goto out;

  if (g_dbus_message_get_message_type (method_reply_message) == G_DBUS_MESSAGE_TYPE_ERROR)
    {
      g_dbus_message_to_gerror (method_reply_message, error);
      goto out;
    }

  fd_list = g_dbus_message_get_unix_fd_list (method_reply_message);
  fd = g_unix_fd_list_get (fd_list, 0, error);

 out:
  g_object_unref (method_call_message);
  g_object_unref (method_reply_message);

  return fd;
}

static void
on_name_appeared (GDBusConnection *connection,
                  const gchar     *name,
                  const gchar     *name_owner,
                  gpointer         user_data)
{
  gint fd;
  GError *error;

  error = NULL;
  fd = get_server_stdout (connection, name_owner, &amp;error);
  if (fd == -1)
    {
      g_printerr ("Error invoking GimmeStdout(): %s\n",
                  error-&gt;message);
      g_error_free (error);
      exit (1);
    }
  else
    {
      gchar now_buf[256];
      time_t now;
      gssize len;
      gchar *str;

      now = time (NULL);
      strftime (now_buf,
                sizeof now_buf,
                "%c",
                localtime (&amp;now));

      str = g_strdup_printf ("On %s, gdbus-example-unix-fd-client with pid %d was here!\n",
                             now_buf,
                             (gint) getpid ());
      len = strlen (str);
      g_warn_if_fail (write (fd, str, len) == len);
      close (fd);

      g_print ("Wrote the following on server's stdout:\n%s", str);

      g_free (str);
      exit (0);
    }
}

static void
on_name_vanished (GDBusConnection *connection,
                  const gchar     *name,
                  gpointer         user_data)
{
  g_printerr ("Failed to get name owner for %s\n"
              "Is ./gdbus-example-server running?\n",
              name);
  exit (1);
}

int
main (int argc, char *argv[])
{
  guint watcher_id;
  GMainLoop *loop;

  g_type_init ();

  watcher_id = g_bus_watch_name (G_BUS_TYPE_SESSION,
                                 "org.gtk.GDBus.TestServer",
                                 G_BUS_NAME_WATCHER_FLAGS_NONE,
                                 on_name_appeared,
                                 on_name_vanished,
                                 NULL,
                                 NULL);

  loop = g_main_loop_new (NULL, FALSE);
  g_main_loop_run (loop);

  g_bus_unwatch_name (watcher_id);
  return 0;
}
</pre></div>
</div>
<p><br class="example-break">
</p>
<p>
</p>
<div class="example">
<a name="gdbus-export"></a><p class="title"><b>Example 5. Exporting a GObject</b></p>
<div class="example-contents"><pre class="programlisting">#include &lt;gio/gio.h&gt;
#include &lt;stdlib.h&gt;

/* ---------------------------------------------------------------------------------------------------- */

/* The object we want to export */
typedef struct _MyObjectClass MyObjectClass;
typedef struct _MyObject MyObject;

struct _MyObjectClass
{
  GObjectClass parent_class;
};

struct _MyObject
{
  GObject parent_instance;

  gint count;
  gchar *name;
};

enum
{
  PROP_0,
  PROP_COUNT,
  PROP_NAME
};

G_DEFINE_TYPE (MyObject, my_object, G_TYPE_OBJECT);

static void
my_object_finalize (GObject *object)
{
  MyObject *myobj = (MyObject*)object;

  g_free (myobj-&gt;name);

  G_OBJECT_CLASS (my_object_parent_class)-&gt;finalize (object);
}

static void
my_object_init (MyObject *object)
{
  object-&gt;count = 0;
  object-&gt;name = NULL;
}

static void
my_object_get_property (GObject    *object,
                        guint       prop_id,
                        GValue     *value,
                        GParamSpec *pspec)
{
  MyObject *myobj = (MyObject*)object;

  switch (prop_id)
    {
    case PROP_COUNT:
      g_value_set_int (value, myobj-&gt;count);
      break;

    case PROP_NAME:
      g_value_set_string (value, myobj-&gt;name);
      break;

    default:
      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
    }
}

static void
my_object_set_property (GObject      *object,
                        guint         prop_id,
                        const GValue *value,
                        GParamSpec   *pspec)
{
  MyObject *myobj = (MyObject*)object;

  switch (prop_id)
    {
    case PROP_COUNT:
      myobj-&gt;count = g_value_get_int (value);
      break;

    case PROP_NAME:
      g_free (myobj-&gt;name);
      myobj-&gt;name = g_value_dup_string (value);
      break;

    default:
      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
    }
}

static void
my_object_class_init (MyObjectClass *class)
{
  GObjectClass *gobject_class = G_OBJECT_CLASS (class);

  gobject_class-&gt;finalize = my_object_finalize;
  gobject_class-&gt;set_property = my_object_set_property;
  gobject_class-&gt;get_property = my_object_get_property;

  g_object_class_install_property (gobject_class,
                                   PROP_COUNT,
                                   g_param_spec_int ("count",
                                                     "Count",
                                                     "Count",
                                                     0, 99999, 0,
                                                     G_PARAM_READWRITE));

  g_object_class_install_property (gobject_class,
                                   PROP_NAME,
                                   g_param_spec_string ("name",
                                                        "Name",
                                                        "Name",
                                                        NULL,
                                                        G_PARAM_READWRITE));
}

/* A method that we want to export */
void
my_object_change_count (MyObject *myobj,
                        gint      change)
{
  myobj-&gt;count = 2 * myobj-&gt;count + change;

  g_object_notify (G_OBJECT (myobj), "count");
}

/* ---------------------------------------------------------------------------------------------------- */

static GDBusNodeInfo *introspection_data = NULL;

/* Introspection data for the service we are exporting */
static const gchar introspection_xml[] =
  "&lt;node&gt;"
  "  &lt;interface name='org.myorg.MyObject'&gt;"
  "    &lt;method name='ChangeCount'&gt;"
  "      &lt;arg type='i' name='change' direction='in'/&gt;"
  "    &lt;/method&gt;"
  "    &lt;property type='i' name='Count' access='read'/&gt;"
  "    &lt;property type='s' name='Name' access='readwrite'/&gt;"
  "  &lt;/interface&gt;"
  "&lt;/node&gt;";


static void
handle_method_call (GDBusConnection       *connection,
                    const gchar           *sender,
                    const gchar           *object_path,
                    const gchar           *interface_name,
                    const gchar           *method_name,
                    GVariant              *parameters,
                    GDBusMethodInvocation *invocation,
                    gpointer               user_data)
{
  MyObject *myobj = user_data;

  if (g_strcmp0 (method_name, "ChangeCount") == 0)
    {
      gint change;
      g_variant_get (parameters, "(i)", &amp;change);

      my_object_change_count (myobj, change);

      g_dbus_method_invocation_return_value (invocation, NULL);
    }
}

static GVariant *
handle_get_property (GDBusConnection  *connection,
                     const gchar      *sender,
                     const gchar      *object_path,
                     const gchar      *interface_name,
                     const gchar      *property_name,
                     GError          **error,
                     gpointer          user_data)
{
  GVariant *ret;
  MyObject *myobj = user_data;

  ret = NULL;
  if (g_strcmp0 (property_name, "Count") == 0)
    {
      ret = g_variant_new_int32 (myobj-&gt;count);
    }
  else if (g_strcmp0 (property_name, "Name") == 0)
    {
      ret = g_variant_new_string (myobj-&gt;name ? myobj-&gt;name : "");
    }

  return ret;
}

static gboolean
handle_set_property (GDBusConnection  *connection,
                     const gchar      *sender,
                     const gchar      *object_path,
                     const gchar      *interface_name,
                     const gchar      *property_name,
                     GVariant         *value,
                     GError          **error,
                     gpointer          user_data)
{
  MyObject *myobj = user_data;

  if (g_strcmp0 (property_name, "Count") == 0)
    {
      g_object_set (myobj, "count", g_variant_get_int32 (value), NULL);
    }
  else if (g_strcmp0 (property_name, "Name") == 0)
    {
      g_object_set (myobj, "name", g_variant_get_string (value, NULL), NULL);
    }

  return TRUE;
}


/* for now */
static const GDBusInterfaceVTable interface_vtable =
{
  handle_method_call,
  handle_get_property,
  handle_set_property
};

static void
send_property_change (GObject         *obj,
                      GParamSpec      *pspec,
                      GDBusConnection *connection)
{
  GVariantBuilder *builder;
  GVariantBuilder *invalidated_builder;
  MyObject *myobj = (MyObject *)obj;

  builder = g_variant_builder_new (G_VARIANT_TYPE_ARRAY);
  invalidated_builder = g_variant_builder_new (G_VARIANT_TYPE ("as"));

  if (g_strcmp0 (pspec-&gt;name, "count") == 0)
    g_variant_builder_add (builder,
                           "{sv}",
                           "Count", g_variant_new_int32 (myobj-&gt;count));
  else if (g_strcmp0 (pspec-&gt;name, "name") == 0)
    g_variant_builder_add (builder,
                           "{sv}",
                           "Name", g_variant_new_string (myobj-&gt;name ? myobj-&gt;name : ""));

  g_dbus_connection_emit_signal (connection,
                                 NULL,
                                 "/org/myorg/MyObject",
                                 "org.freedesktop.DBus.Properties",
                                 "PropertiesChanged",
                                 g_variant_new ("(sa{sv}as)",
                                                "org.myorg.MyObject",
                                                builder,
                                                invalidated_builder),
                                 NULL);
}

static void
on_bus_acquired (GDBusConnection *connection,
                 const gchar     *name,
                 gpointer         user_data)
{
  MyObject *myobj = user_data;
  guint registration_id;

  g_signal_connect (myobj, "notify",
                    G_CALLBACK (send_property_change), connection);
  registration_id = g_dbus_connection_register_object (connection,
                                                       "/org/myorg/MyObject",
                                                       introspection_data-&gt;interfaces[0],
                                                       &amp;interface_vtable,
                                                       myobj,
                                                       NULL,  /* user_data_free_func */
                                                       NULL); /* GError** */
  g_assert (registration_id &gt; 0);
}

static void
on_name_acquired (GDBusConnection *connection,
                  const gchar     *name,
                  gpointer         user_data)
{
}

static void
on_name_lost (GDBusConnection *connection,
              const gchar     *name,
              gpointer         user_data)
{
  exit (1);
}

int
main (int argc, char *argv[])
{
  guint owner_id;
  GMainLoop *loop;
  MyObject *myobj;

  g_type_init ();

  /* We are lazy here - we don't want to manually provide
   * the introspection data structures - so we just build
   * them from XML.
   */
  introspection_data = g_dbus_node_info_new_for_xml (introspection_xml, NULL);
  g_assert (introspection_data != NULL);

  myobj = g_object_new (my_object_get_type (), NULL);

  owner_id = g_bus_own_name (G_BUS_TYPE_SESSION,
                             "org.myorg.MyObject",
                             G_BUS_NAME_OWNER_FLAGS_NONE,
                             on_bus_acquired,
                             on_name_acquired,
                             on_name_lost,
                             myobj,
                             NULL);

  loop = g_main_loop_new (NULL, FALSE);
  g_main_loop_run (loop);

  g_bus_unown_name (owner_id);

  g_dbus_node_info_unref (introspection_data);

  g_object_unref (myobj);

  return 0;
}
</pre></div>
</div>
<p><br class="example-break">
</p>
</div>
<div class="refsect1">
<a name="gio-GDBusConnection.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GBusType"></a><h3>enum GBusType</h3>
<pre class="programlisting">typedef enum
{
  G_BUS_TYPE_STARTER = -1,
  G_BUS_TYPE_NONE = 0,
  G_BUS_TYPE_SYSTEM  = 1,
  G_BUS_TYPE_SESSION = 2
} GBusType;
</pre>
<p>
An enumeration for well-known message buses.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="G-BUS-TYPE-STARTER:CAPS"></a><span class="term"><code class="literal">G_BUS_TYPE_STARTER</code></span></p></td>
<td>An alias for the message bus that activated the process, if any.
</td>
</tr>
<tr>
<td><p><a name="G-BUS-TYPE-NONE:CAPS"></a><span class="term"><code class="literal">G_BUS_TYPE_NONE</code></span></p></td>
<td>Not a message bus.
</td>
</tr>
<tr>
<td><p><a name="G-BUS-TYPE-SYSTEM:CAPS"></a><span class="term"><code class="literal">G_BUS_TYPE_SYSTEM</code></span></p></td>
<td>The system-wide message bus.
</td>
</tr>
<tr>
<td><p><a name="G-BUS-TYPE-SESSION:CAPS"></a><span class="term"><code class="literal">G_BUS_TYPE_SESSION</code></span></p></td>
<td>The login session message bus.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-bus-get"></a><h3>g_bus_get ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_bus_get                           (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GBusType" title="enum GBusType"><span class="type">GBusType</span></a> bus_type</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GCancellable.html#GCancellable" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>
Asynchronously connects to the message bus specified by <em class="parameter"><code>bus_type</code></em>.
</p>
<p>
When the operation is finished, <em class="parameter"><code>callback</code></em> will be invoked. You can
then call <a class="link" href="gio-GDBusConnection.html#g-bus-get-finish" title="g_bus_get_finish ()"><code class="function">g_bus_get_finish()</code></a> to get the result of the operation.
</p>
<p>
This is a asynchronous failable function. See <a class="link" href="gio-GDBusConnection.html#g-bus-get-sync" title="g_bus_get_sync ()"><code class="function">g_bus_get_sync()</code></a> for
the synchronous version.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>bus_type</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusConnection.html#GBusType" title="enum GBusType"><span class="type">GBusType</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GCancellable.html#GCancellable" title="GCancellable"><span class="type">GCancellable</span></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call when the request is satisfied.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>The data to pass to <em class="parameter"><code>callback</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-bus-get-finish"></a><h3>g_bus_get_finish ()</h3>
<pre class="programlisting"><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="returnvalue">GDBusConnection</span></a> *   g_bus_get_finish                    (<em class="parameter"><code><a class="link" href="gio-GAsyncResult.html#GAsyncResult" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *res</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Finishes an operation started with <a class="link" href="gio-GDBusConnection.html#g-bus-get" title="g_bus_get ()"><code class="function">g_bus_get()</code></a>.
</p>
<p>
The returned object is a singleton, that is, shared with other
callers of <a class="link" href="gio-GDBusConnection.html#g-bus-get" title="g_bus_get ()"><code class="function">g_bus_get()</code></a> and <a class="link" href="gio-GDBusConnection.html#g-bus-get-sync" title="g_bus_get_sync ()"><code class="function">g_bus_get_sync()</code></a> for <em class="parameter"><code>bus_type</code></em>. In the
event that you need a private message bus connection, use
<code class="function">g_dbus_address_get_for_bus()</code> and
<a class="link" href="gio-GDBusConnection.html#g-dbus-connection-new-for-address" title="g_dbus_connection_new_for_address ()"><code class="function">g_dbus_connection_new_for_address()</code></a>.
</p>
<p>
Note that the returned <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> object will (usually) have
the <a href="GDBusConnection.html#GDBusConnection--exit-on-close"><span class="type">"exit-on-close"</span></a> property set to <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>res</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GAsyncResult.html#GAsyncResult" title="GAsyncResult"><span class="type">GAsyncResult</span></a> obtained from the <a class="link" href="gio-GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> passed to <a class="link" href="gio-GDBusConnection.html#g-bus-get" title="g_bus_get ()"><code class="function">g_bus_get()</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>Return location for error or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>error</code></em> is set. Free with <a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-bus-get-sync"></a><h3>g_bus_get_sync ()</h3>
<pre class="programlisting"><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="returnvalue">GDBusConnection</span></a> *   g_bus_get_sync                      (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GBusType" title="enum GBusType"><span class="type">GBusType</span></a> bus_type</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GCancellable.html#GCancellable" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Synchronously connects to the message bus specified by <em class="parameter"><code>bus_type</code></em>.
Note that the returned object may shared with other callers,
e.g. if two separate parts of a process calls this function with
the same <em class="parameter"><code>bus_type</code></em>, they will share the same object.
</p>
<p>
This is a synchronous failable function. See <a class="link" href="gio-GDBusConnection.html#g-bus-get" title="g_bus_get ()"><code class="function">g_bus_get()</code></a> and
<a class="link" href="gio-GDBusConnection.html#g-bus-get-finish" title="g_bus_get_finish ()"><code class="function">g_bus_get_finish()</code></a> for the asynchronous version.
</p>
<p>
The returned object is a singleton, that is, shared with other
callers of <a class="link" href="gio-GDBusConnection.html#g-bus-get" title="g_bus_get ()"><code class="function">g_bus_get()</code></a> and <a class="link" href="gio-GDBusConnection.html#g-bus-get-sync" title="g_bus_get_sync ()"><code class="function">g_bus_get_sync()</code></a> for <em class="parameter"><code>bus_type</code></em>. In the
event that you need a private message bus connection, use
<a class="link" href="gio-D-Bus-Addresses.html#g-dbus-address-get-for-bus-sync" title="g_dbus_address_get_for_bus_sync ()"><code class="function">g_dbus_address_get_for_bus_sync()</code></a> and
<a class="link" href="gio-GDBusConnection.html#g-dbus-connection-new-for-address" title="g_dbus_connection_new_for_address ()"><code class="function">g_dbus_connection_new_for_address()</code></a>.
</p>
<p>
Note that the returned <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> object will (usually) have
the <a href="GDBusConnection.html#GDBusConnection--exit-on-close"><span class="type">"exit-on-close"</span></a> property set to <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>bus_type</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusConnection.html#GBusType" title="enum GBusType"><span class="type">GBusType</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GCancellable.html#GCancellable" title="GCancellable"><span class="type">GCancellable</span></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>Return location for error or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>error</code></em> is set. Free with <a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="GDBusConnection"></a><h3>GDBusConnection</h3>
<pre class="programlisting">typedef struct _GDBusConnection GDBusConnection;</pre>
<p>
The <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> structure contains only private data and
should only be accessed using the provided API.
</p>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="GDBusConnectionFlags"></a><h3>enum GDBusConnectionFlags</h3>
<pre class="programlisting">typedef enum {
  G_DBUS_CONNECTION_FLAGS_NONE = 0,
  G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT = (1&lt;&lt;0),
  G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER = (1&lt;&lt;1),
  G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS = (1&lt;&lt;2),
  G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION = (1&lt;&lt;3),
  G_DBUS_CONNECTION_FLAGS_DELAY_MESSAGE_PROCESSING = (1&lt;&lt;4)
} GDBusConnectionFlags;
</pre>
<p>
Flags used when creating a new <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="G-DBUS-CONNECTION-FLAGS-NONE:CAPS"></a><span class="term"><code class="literal">G_DBUS_CONNECTION_FLAGS_NONE</code></span></p></td>
<td>No flags set.
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-CONNECTION-FLAGS-AUTHENTICATION-CLIENT:CAPS"></a><span class="term"><code class="literal">G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT</code></span></p></td>
<td>Perform authentication against server.
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-CONNECTION-FLAGS-AUTHENTICATION-SERVER:CAPS"></a><span class="term"><code class="literal">G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER</code></span></p></td>
<td>Perform authentication against client.
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-CONNECTION-FLAGS-AUTHENTICATION-ALLOW-ANONYMOUS:CAPS"></a><span class="term"><code class="literal">G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS</code></span></p></td>
<td>When
authenticating as a server, allow the anonymous authentication
method.
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-CONNECTION-FLAGS-MESSAGE-BUS-CONNECTION:CAPS"></a><span class="term"><code class="literal">G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION</code></span></p></td>
<td>Pass this flag if connecting to a peer that is a
message bus. This means that the <code class="function">Hello()</code> method will be invoked as part of the connection setup.
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-CONNECTION-FLAGS-DELAY-MESSAGE-PROCESSING:CAPS"></a><span class="term"><code class="literal">G_DBUS_CONNECTION_FLAGS_DELAY_MESSAGE_PROCESSING</code></span></p></td>
<td>If set, processing of D-Bus messages is
delayed until <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-start-message-processing" title="g_dbus_connection_start_message_processing ()"><code class="function">g_dbus_connection_start_message_processing()</code></a> is called.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-new"></a><h3>g_dbus_connection_new ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_dbus_connection_new               (<em class="parameter"><code><a class="link" href="gio-GIOStream.html#GIOStream" title="GIOStream"><span class="type">GIOStream</span></a> *stream</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *guid</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnectionFlags" title="enum GDBusConnectionFlags"><span class="type">GDBusConnectionFlags</span></a> flags</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GDBusAuthObserver.html#GDBusAuthObserver" title="GDBusAuthObserver"><span class="type">GDBusAuthObserver</span></a> *observer</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GCancellable.html#GCancellable" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>
Asynchronously sets up a D-Bus connection for exchanging D-Bus messages
with the end represented by <em class="parameter"><code>stream</code></em>.
</p>
<p>
If <em class="parameter"><code>observer</code></em> is not <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> it may be used to control the
authentication process.
</p>
<p>
When the operation is finished, <em class="parameter"><code>callback</code></em> will be invoked. You can
then call <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-new-finish" title="g_dbus_connection_new_finish ()"><code class="function">g_dbus_connection_new_finish()</code></a> to get the result of the
operation.
</p>
<p>
This is a asynchronous failable constructor. See
<a class="link" href="gio-GDBusConnection.html#g-dbus-connection-new-sync" title="g_dbus_connection_new_sync ()"><code class="function">g_dbus_connection_new_sync()</code></a> for the synchronous
version.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GIOStream.html#GIOStream" title="GIOStream"><span class="type">GIOStream</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>guid</code></em> :</span></p></td>
<td>The GUID to use if a authenticating as a server or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
<td>Flags describing how to make the connection.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>observer</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusAuthObserver.html#GDBusAuthObserver" title="GDBusAuthObserver"><span class="type">GDBusAuthObserver</span></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GCancellable.html#GCancellable" title="GCancellable"><span class="type">GCancellable</span></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call when the request is satisfied.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>The data to pass to <em class="parameter"><code>callback</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-new-finish"></a><h3>g_dbus_connection_new_finish ()</h3>
<pre class="programlisting"><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="returnvalue">GDBusConnection</span></a> *   g_dbus_connection_new_finish        (<em class="parameter"><code><a class="link" href="gio-GAsyncResult.html#GAsyncResult" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *res</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Finishes an operation started with <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-new" title="g_dbus_connection_new ()"><code class="function">g_dbus_connection_new()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>res</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GAsyncResult.html#GAsyncResult" title="GAsyncResult"><span class="type">GAsyncResult</span></a> obtained from the <a class="link" href="gio-GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> passed to <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-new" title="g_dbus_connection_new ()"><code class="function">g_dbus_connection_new()</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>Return location for error or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>error</code></em> is set. Free with <a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-new-sync"></a><h3>g_dbus_connection_new_sync ()</h3>
<pre class="programlisting"><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="returnvalue">GDBusConnection</span></a> *   g_dbus_connection_new_sync          (<em class="parameter"><code><a class="link" href="gio-GIOStream.html#GIOStream" title="GIOStream"><span class="type">GIOStream</span></a> *stream</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *guid</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnectionFlags" title="enum GDBusConnectionFlags"><span class="type">GDBusConnectionFlags</span></a> flags</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GDBusAuthObserver.html#GDBusAuthObserver" title="GDBusAuthObserver"><span class="type">GDBusAuthObserver</span></a> *observer</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GCancellable.html#GCancellable" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Synchronously sets up a D-Bus connection for exchanging D-Bus messages
with the end represented by <em class="parameter"><code>stream</code></em>.
</p>
<p>
If <em class="parameter"><code>observer</code></em> is not <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> it may be used to control the
authentication process.
</p>
<p>
This is a synchronous failable constructor. See
<a class="link" href="gio-GDBusConnection.html#g-dbus-connection-new" title="g_dbus_connection_new ()"><code class="function">g_dbus_connection_new()</code></a> for the asynchronous version.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GIOStream.html#GIOStream" title="GIOStream"><span class="type">GIOStream</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>guid</code></em> :</span></p></td>
<td>The GUID to use if a authenticating as a server or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
<td>Flags describing how to make the connection.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>observer</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusAuthObserver.html#GDBusAuthObserver" title="GDBusAuthObserver"><span class="type">GDBusAuthObserver</span></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GCancellable.html#GCancellable" title="GCancellable"><span class="type">GCancellable</span></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>Return location for error or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>error</code></em> is set. Free with <a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-new-for-address"></a><h3>g_dbus_connection_new_for_address ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_dbus_connection_new_for_address   (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *address</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnectionFlags" title="enum GDBusConnectionFlags"><span class="type">GDBusConnectionFlags</span></a> flags</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GDBusAuthObserver.html#GDBusAuthObserver" title="GDBusAuthObserver"><span class="type">GDBusAuthObserver</span></a> *observer</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GCancellable.html#GCancellable" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>
Asynchronously connects and sets up a D-Bus client connection for
exchanging D-Bus messages with an endpoint specified by <em class="parameter"><code>address</code></em>
which must be in the D-Bus address format.
</p>
<p>
This constructor can only be used to initiate client-side
connections - use <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-new" title="g_dbus_connection_new ()"><code class="function">g_dbus_connection_new()</code></a> if you need to act as the
server. In particular, <em class="parameter"><code>flags</code></em> cannot contain the
<a class="link" href="gio-GDBusConnection.html#G-DBUS-CONNECTION-FLAGS-AUTHENTICATION-SERVER:CAPS"><code class="literal">G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER</code></a> or
<a class="link" href="gio-GDBusConnection.html#G-DBUS-CONNECTION-FLAGS-AUTHENTICATION-ALLOW-ANONYMOUS:CAPS"><code class="literal">G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS</code></a> flags.
</p>
<p>
When the operation is finished, <em class="parameter"><code>callback</code></em> will be invoked. You can
then call <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-new-finish" title="g_dbus_connection_new_finish ()"><code class="function">g_dbus_connection_new_finish()</code></a> to get the result of the
operation.
</p>
<p>
If <em class="parameter"><code>observer</code></em> is not <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> it may be used to control the
authentication process.
</p>
<p>
This is a asynchronous failable constructor. See
<a class="link" href="gio-GDBusConnection.html#g-dbus-connection-new-for-address-sync" title="g_dbus_connection_new_for_address_sync ()"><code class="function">g_dbus_connection_new_for_address_sync()</code></a> for the synchronous
version.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>address</code></em> :</span></p></td>
<td>A D-Bus address.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
<td>Flags describing how to make the connection.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>observer</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusAuthObserver.html#GDBusAuthObserver" title="GDBusAuthObserver"><span class="type">GDBusAuthObserver</span></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GCancellable.html#GCancellable" title="GCancellable"><span class="type">GCancellable</span></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call when the request is satisfied.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>The data to pass to <em class="parameter"><code>callback</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-new-for-address-finish"></a><h3>g_dbus_connection_new_for_address_finish ()</h3>
<pre class="programlisting"><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="returnvalue">GDBusConnection</span></a> *   g_dbus_connection_new_for_address_finish
                                                        (<em class="parameter"><code><a class="link" href="gio-GAsyncResult.html#GAsyncResult" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *res</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Finishes an operation started with <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-new-for-address" title="g_dbus_connection_new_for_address ()"><code class="function">g_dbus_connection_new_for_address()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>res</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GAsyncResult.html#GAsyncResult" title="GAsyncResult"><span class="type">GAsyncResult</span></a> obtained from the <a class="link" href="gio-GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> passed to <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-new" title="g_dbus_connection_new ()"><code class="function">g_dbus_connection_new()</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>Return location for error or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>error</code></em> is set. Free with <a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-new-for-address-sync"></a><h3>g_dbus_connection_new_for_address_sync ()</h3>
<pre class="programlisting"><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="returnvalue">GDBusConnection</span></a> *   g_dbus_connection_new_for_address_sync
                                                        (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *address</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnectionFlags" title="enum GDBusConnectionFlags"><span class="type">GDBusConnectionFlags</span></a> flags</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GDBusAuthObserver.html#GDBusAuthObserver" title="GDBusAuthObserver"><span class="type">GDBusAuthObserver</span></a> *observer</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GCancellable.html#GCancellable" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Synchronously connects and sets up a D-Bus client connection for
exchanging D-Bus messages with an endpoint specified by <em class="parameter"><code>address</code></em>
which must be in the D-Bus address format.
</p>
<p>
This constructor can only be used to initiate client-side
connections - use <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-new-sync" title="g_dbus_connection_new_sync ()"><code class="function">g_dbus_connection_new_sync()</code></a> if you need to act
as the server. In particular, <em class="parameter"><code>flags</code></em> cannot contain the
<a class="link" href="gio-GDBusConnection.html#G-DBUS-CONNECTION-FLAGS-AUTHENTICATION-SERVER:CAPS"><code class="literal">G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER</code></a> or
<a class="link" href="gio-GDBusConnection.html#G-DBUS-CONNECTION-FLAGS-AUTHENTICATION-ALLOW-ANONYMOUS:CAPS"><code class="literal">G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS</code></a> flags.
</p>
<p>
This is a synchronous failable constructor. See
<a class="link" href="gio-GDBusConnection.html#g-dbus-connection-new-for-address" title="g_dbus_connection_new_for_address ()"><code class="function">g_dbus_connection_new_for_address()</code></a> for the asynchronous version.
</p>
<p>
If <em class="parameter"><code>observer</code></em> is not <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> it may be used to control the
authentication process.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>address</code></em> :</span></p></td>
<td>A D-Bus address.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
<td>Flags describing how to make the connection.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>observer</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusAuthObserver.html#GDBusAuthObserver" title="GDBusAuthObserver"><span class="type">GDBusAuthObserver</span></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GCancellable.html#GCancellable" title="GCancellable"><span class="type">GCancellable</span></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>Return location for error or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>error</code></em> is set. Free with <a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-start-message-processing"></a><h3>g_dbus_connection_start_message_processing ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_dbus_connection_start_message_processing
                                                        (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>);</pre>
<p>
If <em class="parameter"><code>connection</code></em> was created with
<a class="link" href="gio-GDBusConnection.html#G-DBUS-CONNECTION-FLAGS-DELAY-MESSAGE-PROCESSING:CAPS"><code class="literal">G_DBUS_CONNECTION_FLAGS_DELAY_MESSAGE_PROCESSING</code></a>, this method
starts processing messages. Does nothing on if <em class="parameter"><code>connection</code></em> wasn't
created with this flag or if the method has already been called.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a>.</td>
</tr></tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-close"></a><h3>g_dbus_connection_close ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_dbus_connection_close             (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GCancellable.html#GCancellable" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>
Closes <em class="parameter"><code>connection</code></em>. Note that this never causes the process to
exit (this might only happen if the other end of a shared message
bus connection disconnects, see <a href="GDBusConnection.html#GDBusConnection--exit-on-close"><span class="type">"exit-on-close"</span></a>).
</p>
<p>
Once the connection is closed, operations such as sending a message
will return with the error <a class="link" href="gio-GIOError.html#G-IO-ERROR-CLOSED:CAPS"><code class="literal">G_IO_ERROR_CLOSED</code></a>. Closing a connection
will not automatically flush the connection so queued messages may
be lost. Use <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-flush" title="g_dbus_connection_flush ()"><code class="function">g_dbus_connection_flush()</code></a> if you need such guarantees.
</p>
<p>
If <em class="parameter"><code>connection</code></em> is already closed, this method fails with
<a class="link" href="gio-GIOError.html#G-IO-ERROR-CLOSED:CAPS"><code class="literal">G_IO_ERROR_CLOSED</code></a>.
</p>
<p>
When <em class="parameter"><code>connection</code></em> has been closed, the <a href="GDBusConnection.html#GDBusConnection-closed"><span class="type">"closed"</span></a>
signal is emitted in the <GTKDOCLINK HREF="g-main-context-push-thread-default">thread-default main
loop</GTKDOCLINK> of the thread that <em class="parameter"><code>connection</code></em> was constructed in.
</p>
<p>
This is an asynchronous method. When the operation is finished,
<em class="parameter"><code>callback</code></em> will be invoked in the <GTKDOCLINK HREF="g-main-context-push-thread-default">thread-default main
loop</GTKDOCLINK> of the thread you are calling this method from. You can
then call <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-close-finish" title="g_dbus_connection_close_finish ()"><code class="function">g_dbus_connection_close_finish()</code></a> to get the result of the
operation.  See <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-close-sync" title="g_dbus_connection_close_sync ()"><code class="function">g_dbus_connection_close_sync()</code></a> for the synchronous
version.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GCancellable.html#GCancellable" title="GCancellable"><span class="type">GCancellable</span></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call when the request is satisfied or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if you don't
care about the result.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>The data to pass to <em class="parameter"><code>callback</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-close-finish"></a><h3>g_dbus_connection_close_finish ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            g_dbus_connection_close_finish      (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GAsyncResult.html#GAsyncResult" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *res</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Finishes an operation started with <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-close" title="g_dbus_connection_close ()"><code class="function">g_dbus_connection_close()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>res</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GAsyncResult.html#GAsyncResult" title="GAsyncResult"><span class="type">GAsyncResult</span></a> obtained from the <a class="link" href="gio-GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> passed to <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-close" title="g_dbus_connection_close ()"><code class="function">g_dbus_connection_close()</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>Return location for error or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the operation succeeded, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if <em class="parameter"><code>error</code></em> is set.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-close-sync"></a><h3>g_dbus_connection_close_sync ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            g_dbus_connection_close_sync        (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GCancellable.html#GCancellable" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Synchronously closees <em class="parameter"><code>connection</code></em>. The calling thread is blocked
until this is done. See <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-close" title="g_dbus_connection_close ()"><code class="function">g_dbus_connection_close()</code></a> for the
asynchronous version of this method and more details about what it
does.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GCancellable.html#GCancellable" title="GCancellable"><span class="type">GCancellable</span></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>Return location for error or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the operation succeeded, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if <em class="parameter"><code>error</code></em> is set.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-is-closed"></a><h3>g_dbus_connection_is_closed ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            g_dbus_connection_is_closed         (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>);</pre>
<p>
Gets whether <em class="parameter"><code>connection</code></em> is closed.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the connection is closed, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-flush"></a><h3>g_dbus_connection_flush ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_dbus_connection_flush             (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GCancellable.html#GCancellable" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>
Asynchronously flushes <em class="parameter"><code>connection</code></em>, that is, writes all queued
outgoing message to the transport and then flushes the transport
(using <a class="link" href="gio-GOutputStream.html#g-output-stream-flush-async" title="g_output_stream_flush_async ()"><code class="function">g_output_stream_flush_async()</code></a>). This is useful in programs
that wants to emit a D-Bus signal and then exit
immediately. Without flushing the connection, there is no guarantee
that the message has been sent to the networking buffers in the OS
kernel.
</p>
<p>
This is an asynchronous method. When the operation is finished,
<em class="parameter"><code>callback</code></em> will be invoked in the <GTKDOCLINK HREF="g-main-context-push-thread-default">thread-default main
loop</GTKDOCLINK> of the thread you are calling this method from. You can
then call <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-flush-finish" title="g_dbus_connection_flush_finish ()"><code class="function">g_dbus_connection_flush_finish()</code></a> to get the result of the
operation.  See <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-flush-sync" title="g_dbus_connection_flush_sync ()"><code class="function">g_dbus_connection_flush_sync()</code></a> for the synchronous
version.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GCancellable.html#GCancellable" title="GCancellable"><span class="type">GCancellable</span></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call when the request is satisfied or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if you don't
care about the result.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>The data to pass to <em class="parameter"><code>callback</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-flush-finish"></a><h3>g_dbus_connection_flush_finish ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            g_dbus_connection_flush_finish      (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GAsyncResult.html#GAsyncResult" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *res</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Finishes an operation started with <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-flush" title="g_dbus_connection_flush ()"><code class="function">g_dbus_connection_flush()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>res</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GAsyncResult.html#GAsyncResult" title="GAsyncResult"><span class="type">GAsyncResult</span></a> obtained from the <a class="link" href="gio-GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> passed to <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-flush" title="g_dbus_connection_flush ()"><code class="function">g_dbus_connection_flush()</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>Return location for error or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the operation succeeded, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if <em class="parameter"><code>error</code></em> is set.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-flush-sync"></a><h3>g_dbus_connection_flush_sync ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            g_dbus_connection_flush_sync        (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GCancellable.html#GCancellable" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Synchronously flushes <em class="parameter"><code>connection</code></em>. The calling thread is blocked
until this is done. See <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-flush" title="g_dbus_connection_flush ()"><code class="function">g_dbus_connection_flush()</code></a> for the
asynchronous version of this method and more details about what it
does.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GCancellable.html#GCancellable" title="GCancellable"><span class="type">GCancellable</span></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>Return location for error or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the operation succeeded, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if <em class="parameter"><code>error</code></em> is set.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-get-exit-on-close"></a><h3>g_dbus_connection_get_exit_on_close ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            g_dbus_connection_get_exit_on_close (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>);</pre>
<p>
Gets whether the process is terminated when <em class="parameter"><code>connection</code></em> is
closed by the remote peer. See
<a href="GDBusConnection.html#GDBusConnection--exit-on-close"><span class="type">"exit-on-close"</span></a> for more details.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>Whether the process is terminated when <em class="parameter"><code>connection</code></em> is
closed by the remote peer.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-set-exit-on-close"></a><h3>g_dbus_connection_set_exit_on_close ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_dbus_connection_set_exit_on_close (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> exit_on_close</code></em>);</pre>
<p>
Sets whether the process should be terminated when <em class="parameter"><code>connection</code></em> is
closed by the remote peer. See <a href="GDBusConnection.html#GDBusConnection--exit-on-close"><span class="type">"exit-on-close"</span></a> for
more details.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>exit_on_close</code></em> :</span></p></td>
<td>Whether the process should be terminated
when <em class="parameter"><code>connection</code></em> is closed by the remote peer.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-get-stream"></a><h3>g_dbus_connection_get_stream ()</h3>
<pre class="programlisting"><a class="link" href="gio-GIOStream.html#GIOStream" title="GIOStream"><span class="returnvalue">GIOStream</span></a> *         g_dbus_connection_get_stream        (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>);</pre>
<p>
Gets the underlying stream used for IO.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>a <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the stream used for IO. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-get-guid"></a><h3>g_dbus_connection_get_guid ()</h3>
<pre class="programlisting">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *       g_dbus_connection_get_guid          (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>);</pre>
<p>
The GUID of the peer performing the role of server when
authenticating. See <a href="GDBusConnection.html#GDBusConnection--guid"><span class="type">"guid"</span></a> for more details.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The GUID. Do not free this string, it is owned by
<em class="parameter"><code>connection</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-get-unique-name"></a><h3>g_dbus_connection_get_unique_name ()</h3>
<pre class="programlisting">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *       g_dbus_connection_get_unique_name   (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>);</pre>
<p>
Gets the unique name of <em class="parameter"><code>connection</code></em> as assigned by the message
bus. This can also be used to figure out if <em class="parameter"><code>connection</code></em> is a
message bus connection.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The unique name or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>connection</code></em> is not a message
bus connection. Do not free this string, it is owned by
<em class="parameter"><code>connection</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="GDBusCapabilityFlags"></a><h3>enum GDBusCapabilityFlags</h3>
<pre class="programlisting">typedef enum {
  G_DBUS_CAPABILITY_FLAGS_NONE = 0,
  G_DBUS_CAPABILITY_FLAGS_UNIX_FD_PASSING = (1&lt;&lt;0)
} GDBusCapabilityFlags;
</pre>
<p>
Capabilities negotiated with the remote peer.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="G-DBUS-CAPABILITY-FLAGS-NONE:CAPS"></a><span class="term"><code class="literal">G_DBUS_CAPABILITY_FLAGS_NONE</code></span></p></td>
<td>No flags set.
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-CAPABILITY-FLAGS-UNIX-FD-PASSING:CAPS"></a><span class="term"><code class="literal">G_DBUS_CAPABILITY_FLAGS_UNIX_FD_PASSING</code></span></p></td>
<td>The connection
supports exchanging UNIX file descriptors with the remote peer.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-get-capabilities"></a><h3>g_dbus_connection_get_capabilities ()</h3>
<pre class="programlisting"><a class="link" href="gio-GDBusConnection.html#GDBusCapabilityFlags" title="enum GDBusCapabilityFlags"><span class="returnvalue">GDBusCapabilityFlags</span></a>  g_dbus_connection_get_capabilities
                                                        (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>);</pre>
<p>
Gets the capabilities negotiated with the remote peer
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>Zero or more flags from the <a class="link" href="gio-GDBusConnection.html#GDBusCapabilityFlags" title="enum GDBusCapabilityFlags"><span class="type">GDBusCapabilityFlags</span></a> enumeration.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-get-peer-credentials"></a><h3>g_dbus_connection_get_peer_credentials ()</h3>
<pre class="programlisting"><a class="link" href="gio-GCredentials.html#GCredentials" title="GCredentials"><span class="returnvalue">GCredentials</span></a> *      g_dbus_connection_get_peer_credentials
                                                        (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>);</pre>
<p>
Gets the credentials of the authenticated peer. This will always
return <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> unless <em class="parameter"><code>connection</code></em> acted as a server
(e.g. <a class="link" href="gio-GDBusConnection.html#G-DBUS-CONNECTION-FLAGS-AUTHENTICATION-SERVER:CAPS"><code class="literal">G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER</code></a> was passed)
when set up and the client passed credentials as part of the
authentication process.
</p>
<p>
In a message bus setup, the message bus is always the server and
each application is a client. So this method will always return
<a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> for message bus clients.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A <a class="link" href="gio-GCredentials.html#GCredentials" title="GCredentials"><span class="type">GCredentials</span></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if not available. Do not free
this object, it is owned by <em class="parameter"><code>connection</code></em>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="GDBusCallFlags"></a><h3>enum GDBusCallFlags</h3>
<pre class="programlisting">typedef enum {
  G_DBUS_CALL_FLAGS_NONE = 0,
  G_DBUS_CALL_FLAGS_NO_AUTO_START = (1&lt;&lt;0)
} GDBusCallFlags;
</pre>
<p>
Flags used in <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-call" title="g_dbus_connection_call ()"><code class="function">g_dbus_connection_call()</code></a> and similar APIs.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="G-DBUS-CALL-FLAGS-NONE:CAPS"></a><span class="term"><code class="literal">G_DBUS_CALL_FLAGS_NONE</code></span></p></td>
<td>No flags set.
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-CALL-FLAGS-NO-AUTO-START:CAPS"></a><span class="term"><code class="literal">G_DBUS_CALL_FLAGS_NO_AUTO_START</code></span></p></td>
<td>The bus must not launch
an owner for the destination name in response to this method
invocation.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-call"></a><h3>g_dbus_connection_call ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_dbus_connection_call              (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *bus_name</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *object_path</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *interface_name</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *method_name</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *parameters</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-GVariantType.html#GVariantType"><span class="type">GVariantType</span></a> *reply_type</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusCallFlags" title="enum GDBusCallFlags"><span class="type">GDBusCallFlags</span></a> flags</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> timeout_msec</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GCancellable.html#GCancellable" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>
Asynchronously invokes the <em class="parameter"><code>method_name</code></em> method on the
<em class="parameter"><code>interface_name</code></em> D-Bus interface on the remote object at
<em class="parameter"><code>object_path</code></em> owned by <em class="parameter"><code>bus_name</code></em>.
</p>
<p>
If <em class="parameter"><code>connection</code></em> is closed then the operation will fail with
<a class="link" href="gio-GIOError.html#G-IO-ERROR-CLOSED:CAPS"><code class="literal">G_IO_ERROR_CLOSED</code></a>. If <em class="parameter"><code>cancellable</code></em> is canceled, the operation will
fail with <a class="link" href="gio-GIOError.html#G-IO-ERROR-CANCELLED:CAPS"><code class="literal">G_IO_ERROR_CANCELLED</code></a>. If <em class="parameter"><code>parameters</code></em> contains a value
not compatible with the D-Bus protocol, the operation fails with
<a class="link" href="gio-GIOError.html#G-IO-ERROR-INVALID-ARGUMENT:CAPS"><code class="literal">G_IO_ERROR_INVALID_ARGUMENT</code></a>.
</p>
<p>
If <em class="parameter"><code>reply_type</code></em> is non-<a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> then the reply will be checked for having this type and an
error will be raised if it does not match.  Said another way, if you give a <em class="parameter"><code>reply_type</code></em>
then any non-<a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> return value will be of this type.
</p>
<p>
If the <em class="parameter"><code>parameters</code></em> <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> is floating, it is consumed. This allows
convenient 'inline' use of <a href="../glib/glib-GVariant.html#g-variant-new"><code class="function">g_variant_new()</code></a>, e.g.:
</p>
<div class="informalexample"><pre class="programlisting">
 g_dbus_connection_call (connection,
                         "org.freedesktop.StringThings",
                         "/org/freedesktop/StringThings",
                         "org.freedesktop.StringThings",
                         "TwoStrings",
                         g_variant_new ("(ss)",
                                        "Thing One",
                                        "Thing Two"),
                         NULL,
                         G_DBUS_CALL_FLAGS_NONE,
                         -1,
                         NULL,
                         (GAsyncReadyCallback) two_strings_done,
                         NULL);
</pre></div>
<p>
</p>
<p>
This is an asynchronous method. When the operation is finished, <em class="parameter"><code>callback</code></em> will be invoked
in the <a href="../glib/glib-The-Main-Event-Loop.html#g-main-context-push-thread-default">thread-default main loop</a>
of the thread you are calling this method from. You can then call
<a class="link" href="gio-GDBusConnection.html#g-dbus-connection-call-finish" title="g_dbus_connection_call_finish ()"><code class="function">g_dbus_connection_call_finish()</code></a> to get the result of the operation.
See <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-call-sync" title="g_dbus_connection_call_sync ()"><code class="function">g_dbus_connection_call_sync()</code></a> for the synchronous version of this
function.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>bus_name</code></em> :</span></p></td>
<td>A unique or well-known bus name or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>connection</code></em> is not a message bus connection.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>object_path</code></em> :</span></p></td>
<td>Path of remote object.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>interface_name</code></em> :</span></p></td>
<td>D-Bus interface to invoke method on.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>method_name</code></em> :</span></p></td>
<td>The name of the method to invoke.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>parameters</code></em> :</span></p></td>
<td>A <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> tuple with parameters for the method or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if not passing parameters.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>reply_type</code></em> :</span></p></td>
<td>The expected type of the reply, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
<td>Flags from the <a class="link" href="gio-GDBusConnection.html#GDBusCallFlags" title="enum GDBusCallFlags"><span class="type">GDBusCallFlags</span></a> enumeration.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>timeout_msec</code></em> :</span></p></td>
<td>The timeout in milliseconds, -1 to use the default
timeout or <a href="../glib/glib-Limits-of-Basic-Types.html#G-MAXINT:CAPS"><code class="literal">G_MAXINT</code></a> for no timeout.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GCancellable.html#GCancellable" title="GCancellable"><span class="type">GCancellable</span></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call when the request is satisfied or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if you don't
care about the result of the method invocation.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>The data to pass to <em class="parameter"><code>callback</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-call-finish"></a><h3>g_dbus_connection_call_finish ()</h3>
<pre class="programlisting"><a href="../glib/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *          g_dbus_connection_call_finish       (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GAsyncResult.html#GAsyncResult" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *res</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Finishes an operation started with <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-call" title="g_dbus_connection_call ()"><code class="function">g_dbus_connection_call()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>res</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GAsyncResult.html#GAsyncResult" title="GAsyncResult"><span class="type">GAsyncResult</span></a> obtained from the <a class="link" href="gio-GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> passed to <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-call" title="g_dbus_connection_call ()"><code class="function">g_dbus_connection_call()</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>Return location for error or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>error</code></em> is set. Otherwise a <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> tuple with
return values. Free with <a href="../glib/glib-GVariant.html#g-variant-unref"><code class="function">g_variant_unref()</code></a>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-call-sync"></a><h3>g_dbus_connection_call_sync ()</h3>
<pre class="programlisting"><a href="../glib/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *          g_dbus_connection_call_sync         (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *bus_name</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *object_path</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *interface_name</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *method_name</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *parameters</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-GVariantType.html#GVariantType"><span class="type">GVariantType</span></a> *reply_type</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusCallFlags" title="enum GDBusCallFlags"><span class="type">GDBusCallFlags</span></a> flags</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> timeout_msec</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GCancellable.html#GCancellable" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Synchronously invokes the <em class="parameter"><code>method_name</code></em> method on the
<em class="parameter"><code>interface_name</code></em> D-Bus interface on the remote object at
<em class="parameter"><code>object_path</code></em> owned by <em class="parameter"><code>bus_name</code></em>.
</p>
<p>
If <em class="parameter"><code>connection</code></em> is closed then the operation will fail with
<a class="link" href="gio-GIOError.html#G-IO-ERROR-CLOSED:CAPS"><code class="literal">G_IO_ERROR_CLOSED</code></a>. If <em class="parameter"><code>cancellable</code></em> is canceled, the
operation will fail with <a class="link" href="gio-GIOError.html#G-IO-ERROR-CANCELLED:CAPS"><code class="literal">G_IO_ERROR_CANCELLED</code></a>. If <em class="parameter"><code>parameters</code></em>
contains a value not compatible with the D-Bus protocol, the operation
fails with <a class="link" href="gio-GIOError.html#G-IO-ERROR-INVALID-ARGUMENT:CAPS"><code class="literal">G_IO_ERROR_INVALID_ARGUMENT</code></a>.
</p>
<p>
If <em class="parameter"><code>reply_type</code></em> is non-<a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> then the reply will be checked for having
this type and an error will be raised if it does not match.  Said
another way, if you give a <em class="parameter"><code>reply_type</code></em> then any non-<a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> return
value will be of this type.
</p>
<p>
If the <em class="parameter"><code>parameters</code></em> <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> is floating, it is consumed.
This allows convenient 'inline' use of <a href="../glib/glib-GVariant.html#g-variant-new"><code class="function">g_variant_new()</code></a>, e.g.:
</p>
<div class="informalexample"><pre class="programlisting">
 g_dbus_connection_call_sync (connection,
                              "org.freedesktop.StringThings",
                              "/org/freedesktop/StringThings",
                              "org.freedesktop.StringThings",
                              "TwoStrings",
                              g_variant_new ("(ss)",
                                             "Thing One",
                                             "Thing Two"),
                              NULL,
                              G_DBUS_CALL_FLAGS_NONE,
                              -1,
                              NULL,
                              &amp;error);
</pre></div>
<p>
</p>
<p>
The calling thread is blocked until a reply is received. See
<a class="link" href="gio-GDBusConnection.html#g-dbus-connection-call" title="g_dbus_connection_call ()"><code class="function">g_dbus_connection_call()</code></a> for the asynchronous version of
this method.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>bus_name</code></em> :</span></p></td>
<td>A unique or well-known bus name.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>object_path</code></em> :</span></p></td>
<td>Path of remote object.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>interface_name</code></em> :</span></p></td>
<td>D-Bus interface to invoke method on.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>method_name</code></em> :</span></p></td>
<td>The name of the method to invoke.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>parameters</code></em> :</span></p></td>
<td>A <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> tuple with parameters for the method or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if not passing parameters.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>reply_type</code></em> :</span></p></td>
<td>The expected type of the reply, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
<td>Flags from the <a class="link" href="gio-GDBusConnection.html#GDBusCallFlags" title="enum GDBusCallFlags"><span class="type">GDBusCallFlags</span></a> enumeration.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>timeout_msec</code></em> :</span></p></td>
<td>The timeout in milliseconds, -1 to use the default
timeout or <a href="../glib/glib-Limits-of-Basic-Types.html#G-MAXINT:CAPS"><code class="literal">G_MAXINT</code></a> for no timeout.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GCancellable.html#GCancellable" title="GCancellable"><span class="type">GCancellable</span></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>Return location for error or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>error</code></em> is set. Otherwise a <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> tuple with
return values. Free with <a href="../glib/glib-GVariant.html#g-variant-unref"><code class="function">g_variant_unref()</code></a>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-emit-signal"></a><h3>g_dbus_connection_emit_signal ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            g_dbus_connection_emit_signal       (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *destination_bus_name</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *object_path</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *interface_name</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *signal_name</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *parameters</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Emits a signal.
</p>
<p>
If the parameters GVariant is floating, it is consumed.
</p>
<p>
This can only fail if <em class="parameter"><code>parameters</code></em> is not compatible with the D-Bus protocol.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>destination_bus_name</code></em> :</span></p></td>
<td>The unique bus name for the destination for the signal or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to emit to all listeners.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>object_path</code></em> :</span></p></td>
<td>Path of remote object.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>interface_name</code></em> :</span></p></td>
<td>D-Bus interface to emit a signal on.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>signal_name</code></em> :</span></p></td>
<td>The name of the signal to emit.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>parameters</code></em> :</span></p></td>
<td>A <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> tuple with parameters for the signal or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if not passing parameters.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>Return location for error or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> unless <em class="parameter"><code>error</code></em> is set.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="GDBusSignalFlags"></a><h3>enum GDBusSignalFlags</h3>
<pre class="programlisting">typedef enum /*&lt; flags &gt;*/
{
  G_DBUS_SIGNAL_FLAGS_NONE = 0,
  G_DBUS_SIGNAL_FLAGS_NO_MATCH_RULE = (1&lt;&lt;0)
} GDBusSignalFlags;
</pre>
<p>
Flags used when subscribing to signals via <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-signal-subscribe" title="g_dbus_connection_signal_subscribe ()"><code class="function">g_dbus_connection_signal_subscribe()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="G-DBUS-SIGNAL-FLAGS-NONE:CAPS"></a><span class="term"><code class="literal">G_DBUS_SIGNAL_FLAGS_NONE</code></span></p></td>
<td>No flags set.
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-SIGNAL-FLAGS-NO-MATCH-RULE:CAPS"></a><span class="term"><code class="literal">G_DBUS_SIGNAL_FLAGS_NO_MATCH_RULE</code></span></p></td>
<td>Don't actually send the AddMatch
DBus call for this signal subscription.  This gives you more control
over which match rules you add (but you must add them manually).
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="GDBusSignalCallback"></a><h3>GDBusSignalCallback ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                (*GDBusSignalCallback)              (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *sender_name</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *object_path</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *interface_name</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *signal_name</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *parameters</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>
Signature for callback function used in <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-signal-subscribe" title="g_dbus_connection_signal_subscribe ()"><code class="function">g_dbus_connection_signal_subscribe()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>sender_name</code></em> :</span></p></td>
<td>The unique bus name of the sender of the signal.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>object_path</code></em> :</span></p></td>
<td>The object path that the signal was emitted on.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>interface_name</code></em> :</span></p></td>
<td>The name of the interface.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>signal_name</code></em> :</span></p></td>
<td>The name of the signal.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>parameters</code></em> :</span></p></td>
<td>A <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> tuple with parameters for the signal.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>User data passed when subscribing to the signal.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-signal-subscribe"></a><h3>g_dbus_connection_signal_subscribe ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               g_dbus_connection_signal_subscribe  (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *sender</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *interface_name</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *member</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *object_path</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *arg0</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusSignalFlags" title="enum GDBusSignalFlags"><span class="type">GDBusSignalFlags</span></a> flags</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusSignalCallback" title="GDBusSignalCallback ()"><span class="type">GDBusSignalCallback</span></a> callback</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> user_data_free_func</code></em>);</pre>
<p>
Subscribes to signals on <em class="parameter"><code>connection</code></em> and invokes <em class="parameter"><code>callback</code></em> with a
whenever the signal is received. Note that <em class="parameter"><code>callback</code></em>
will be invoked in the <GTKDOCLINK HREF="g-main-context-push-thread-default">thread-default main
loop</GTKDOCLINK> of the thread you are calling this method from.
</p>
<p>
If <em class="parameter"><code>connection</code></em> is not a message bus connection, <em class="parameter"><code>sender</code></em> must be
<a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
</p>
<p>
If <em class="parameter"><code>sender</code></em> is a well-known name note that <em class="parameter"><code>callback</code></em> is invoked with
the unique name for the owner of <em class="parameter"><code>sender</code></em>, not the well-known name
as one would expect. This is because the message bus rewrites the
name. As such, to avoid certain race conditions, users should be
tracking the name owner of the well-known name and use that when
processing the received signal.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>sender</code></em> :</span></p></td>
<td>Sender name to match on (unique or well-known name) or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to listen from all senders.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>interface_name</code></em> :</span></p></td>
<td>D-Bus interface name to match on or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to match on all interfaces.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>member</code></em> :</span></p></td>
<td>D-Bus signal name to match on or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to match on all signals.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>object_path</code></em> :</span></p></td>
<td>Object path to match on or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to match on all object paths.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>arg0</code></em> :</span></p></td>
<td>Contents of first string argument to match on or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to match on all kinds of arguments.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
<td>Flags describing how to subscribe to the signal (currently unused).</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
<td>Callback to invoke when there is a signal matching the requested data.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>User data to pass to <em class="parameter"><code>callback</code></em>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data_free_func</code></em> :</span></p></td>
<td>Function to free <em class="parameter"><code>user_data</code></em> with when subscription is removed or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A subscription identifier that can be used with <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-signal-unsubscribe" title="g_dbus_connection_signal_unsubscribe ()"><code class="function">g_dbus_connection_signal_unsubscribe()</code></a>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-signal-unsubscribe"></a><h3>g_dbus_connection_signal_unsubscribe ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_dbus_connection_signal_unsubscribe
                                                        (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> subscription_id</code></em>);</pre>
<p>
Unsubscribes from signals.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>subscription_id</code></em> :</span></p></td>
<td>A subscription id obtained from <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-signal-subscribe" title="g_dbus_connection_signal_subscribe ()"><code class="function">g_dbus_connection_signal_subscribe()</code></a>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="GDBusSendMessageFlags"></a><h3>enum GDBusSendMessageFlags</h3>
<pre class="programlisting">typedef enum
{
  G_DBUS_SEND_MESSAGE_FLAGS_NONE = 0,
  G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL = (1&lt;&lt;0)
} GDBusSendMessageFlags;
</pre>
<p>
Flags used when sending <a class="link" href="gio-GDBusMessage.html#GDBusMessage" title="GDBusMessage"><span class="type">GDBusMessage</span></a>s on a <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="G-DBUS-SEND-MESSAGE-FLAGS-NONE:CAPS"></a><span class="term"><code class="literal">G_DBUS_SEND_MESSAGE_FLAGS_NONE</code></span></p></td>
<td>No flags set.
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-SEND-MESSAGE-FLAGS-PRESERVE-SERIAL:CAPS"></a><span class="term"><code class="literal">G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL</code></span></p></td>
<td>Do not automatically
assign a serial number from the <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> object when
sending a message.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-send-message"></a><h3>g_dbus_connection_send_message ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            g_dbus_connection_send_message      (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GDBusMessage.html#GDBusMessage" title="GDBusMessage"><span class="type">GDBusMessage</span></a> *message</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusSendMessageFlags" title="enum GDBusSendMessageFlags"><span class="type">GDBusSendMessageFlags</span></a> flags</code></em>,
                                                         <em class="parameter"><code>volatile <a href="../glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> *out_serial</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Asynchronously sends <em class="parameter"><code>message</code></em> to the peer represented by <em class="parameter"><code>connection</code></em>.
</p>
<p>
Unless <em class="parameter"><code>flags</code></em> contain the
<a class="link" href="gio-GDBusConnection.html#G-DBUS-SEND-MESSAGE-FLAGS-PRESERVE-SERIAL:CAPS"><code class="literal">G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL</code></a> flag, the serial number
will be assigned by <em class="parameter"><code>connection</code></em> and set on <em class="parameter"><code>message</code></em> via
<a class="link" href="gio-GDBusMessage.html#g-dbus-message-set-serial" title="g_dbus_message_set_serial ()"><code class="function">g_dbus_message_set_serial()</code></a>. If <em class="parameter"><code>out_serial</code></em> is not <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the
serial number used will be written to this location prior to
submitting the message to the underlying transport.
</p>
<p>
If <em class="parameter"><code>connection</code></em> is closed then the operation will fail with
<a class="link" href="gio-GIOError.html#G-IO-ERROR-CLOSED:CAPS"><code class="literal">G_IO_ERROR_CLOSED</code></a>. If <em class="parameter"><code>message</code></em> is not well-formed,
the operation fails with <a class="link" href="gio-GIOError.html#G-IO-ERROR-INVALID-ARGUMENT:CAPS"><code class="literal">G_IO_ERROR_INVALID_ARGUMENT</code></a>.
</p>
<p>
See <a class="xref" href="gio-GDBusConnection.html#gdbus-server" title="Example 2. D-Bus server example">Example 2, “D-Bus server example”</a> and <a class="xref" href="gio-GDBusConnection.html#gdbus-unix-fd-client" title="Example 4. D-Bus UNIX File Descriptor example">Example 4, “D-Bus UNIX File Descriptor example”</a> for an example of how to use this
low-level API to send and receive UNIX file descriptors.
</p>
<p>
Note that <em class="parameter"><code>message</code></em> must be unlocked, unless <em class="parameter"><code>flags</code></em> contain the
<a class="link" href="gio-GDBusConnection.html#G-DBUS-SEND-MESSAGE-FLAGS-PRESERVE-SERIAL:CAPS"><code class="literal">G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL</code></a> flag.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>message</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusMessage.html#GDBusMessage" title="GDBusMessage"><span class="type">GDBusMessage</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
<td>Flags affecting how the message is sent.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out_serial</code></em> :</span></p></td>
<td>Return location for serial number assigned to <em class="parameter"><code>message</code></em> when sending it or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>Return location for error or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the message was well-formed and queued for
transmission, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if <em class="parameter"><code>error</code></em> is set.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-send-message-with-reply"></a><h3>g_dbus_connection_send_message_with_reply ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_dbus_connection_send_message_with_reply
                                                        (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GDBusMessage.html#GDBusMessage" title="GDBusMessage"><span class="type">GDBusMessage</span></a> *message</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusSendMessageFlags" title="enum GDBusSendMessageFlags"><span class="type">GDBusSendMessageFlags</span></a> flags</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> timeout_msec</code></em>,
                                                         <em class="parameter"><code>volatile <a href="../glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> *out_serial</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GCancellable.html#GCancellable" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>
Asynchronously sends <em class="parameter"><code>message</code></em> to the peer represented by <em class="parameter"><code>connection</code></em>.
</p>
<p>
Unless <em class="parameter"><code>flags</code></em> contain the
<a class="link" href="gio-GDBusConnection.html#G-DBUS-SEND-MESSAGE-FLAGS-PRESERVE-SERIAL:CAPS"><code class="literal">G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL</code></a> flag, the serial number
will be assigned by <em class="parameter"><code>connection</code></em> and set on <em class="parameter"><code>message</code></em> via
<a class="link" href="gio-GDBusMessage.html#g-dbus-message-set-serial" title="g_dbus_message_set_serial ()"><code class="function">g_dbus_message_set_serial()</code></a>. If <em class="parameter"><code>out_serial</code></em> is not <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the
serial number used will be written to this location prior to
submitting the message to the underlying transport.
</p>
<p>
If <em class="parameter"><code>connection</code></em> is closed then the operation will fail with
<a class="link" href="gio-GIOError.html#G-IO-ERROR-CLOSED:CAPS"><code class="literal">G_IO_ERROR_CLOSED</code></a>. If <em class="parameter"><code>cancellable</code></em> is canceled, the operation will
fail with <a class="link" href="gio-GIOError.html#G-IO-ERROR-CANCELLED:CAPS"><code class="literal">G_IO_ERROR_CANCELLED</code></a>. If <em class="parameter"><code>message</code></em> is not well-formed,
the operation fails with <a class="link" href="gio-GIOError.html#G-IO-ERROR-INVALID-ARGUMENT:CAPS"><code class="literal">G_IO_ERROR_INVALID_ARGUMENT</code></a>.
</p>
<p>
This is an asynchronous method. When the operation is finished, <em class="parameter"><code>callback</code></em> will be invoked
in the <a href="../glib/glib-The-Main-Event-Loop.html#g-main-context-push-thread-default">thread-default main loop</a>
of the thread you are calling this method from. You can then call
<a class="link" href="gio-GDBusConnection.html#g-dbus-connection-send-message-with-reply-finish" title="g_dbus_connection_send_message_with_reply_finish ()"><code class="function">g_dbus_connection_send_message_with_reply_finish()</code></a> to get the result of the operation.
See <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-send-message-with-reply-sync" title="g_dbus_connection_send_message_with_reply_sync ()"><code class="function">g_dbus_connection_send_message_with_reply_sync()</code></a> for the synchronous version.
</p>
<p>
Note that <em class="parameter"><code>message</code></em> must be unlocked, unless <em class="parameter"><code>flags</code></em> contain the
<a class="link" href="gio-GDBusConnection.html#G-DBUS-SEND-MESSAGE-FLAGS-PRESERVE-SERIAL:CAPS"><code class="literal">G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL</code></a> flag.
</p>
<p>
See <a class="xref" href="gio-GDBusConnection.html#gdbus-server" title="Example 2. D-Bus server example">Example 2, “D-Bus server example”</a> and <a class="xref" href="gio-GDBusConnection.html#gdbus-unix-fd-client" title="Example 4. D-Bus UNIX File Descriptor example">Example 4, “D-Bus UNIX File Descriptor example”</a> for an example of how to use this
low-level API to send and receive UNIX file descriptors.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>message</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusMessage.html#GDBusMessage" title="GDBusMessage"><span class="type">GDBusMessage</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
<td>Flags affecting how the message is sent.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>timeout_msec</code></em> :</span></p></td>
<td>The timeout in milliseconds, -1 to use the default
timeout or <a href="../glib/glib-Limits-of-Basic-Types.html#G-MAXINT:CAPS"><code class="literal">G_MAXINT</code></a> for no timeout.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out_serial</code></em> :</span></p></td>
<td>Return location for serial number assigned to <em class="parameter"><code>message</code></em> when sending it or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GCancellable.html#GCancellable" title="GCancellable"><span class="type">GCancellable</span></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call when the request is satisfied or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if you don't
care about the result.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>The data to pass to <em class="parameter"><code>callback</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-send-message-with-reply-finish"></a><h3>g_dbus_connection_send_message_with_reply_finish ()</h3>
<pre class="programlisting"><a class="link" href="gio-GDBusMessage.html#GDBusMessage" title="GDBusMessage"><span class="returnvalue">GDBusMessage</span></a> *      g_dbus_connection_send_message_with_reply_finish
                                                        (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GAsyncResult.html#GAsyncResult" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *res</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Finishes an operation started with <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-send-message-with-reply" title="g_dbus_connection_send_message_with_reply ()"><code class="function">g_dbus_connection_send_message_with_reply()</code></a>.
</p>
<p>
Note that <em class="parameter"><code>error</code></em> is only set if a local in-process error
occured. That is to say that the returned <a class="link" href="gio-GDBusMessage.html#GDBusMessage" title="GDBusMessage"><span class="type">GDBusMessage</span></a> object may
be of type <a class="link" href="gio-GDBusMessage.html#G-DBUS-MESSAGE-TYPE-ERROR:CAPS"><code class="literal">G_DBUS_MESSAGE_TYPE_ERROR</code></a>. Use
<a class="link" href="gio-GDBusMessage.html#g-dbus-message-to-gerror" title="g_dbus_message_to_gerror ()"><code class="function">g_dbus_message_to_gerror()</code></a> to transcode this to a <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>.
</p>
<p>
See <a class="xref" href="gio-GDBusConnection.html#gdbus-server" title="Example 2. D-Bus server example">Example 2, “D-Bus server example”</a> and <a class="xref" href="gio-GDBusConnection.html#gdbus-unix-fd-client" title="Example 4. D-Bus UNIX File Descriptor example">Example 4, “D-Bus UNIX File Descriptor example”</a> for an example of how to use this
low-level API to send and receive UNIX file descriptors.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>a <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>res</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GAsyncResult.html#GAsyncResult" title="GAsyncResult"><span class="type">GAsyncResult</span></a> obtained from the <a class="link" href="gio-GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> passed to <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-send-message-with-reply" title="g_dbus_connection_send_message_with_reply ()"><code class="function">g_dbus_connection_send_message_with_reply()</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>Return location for error or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A locked <a class="link" href="gio-GDBusMessage.html#GDBusMessage" title="GDBusMessage"><span class="type">GDBusMessage</span></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>error</code></em> is set. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-send-message-with-reply-sync"></a><h3>g_dbus_connection_send_message_with_reply_sync ()</h3>
<pre class="programlisting"><a class="link" href="gio-GDBusMessage.html#GDBusMessage" title="GDBusMessage"><span class="returnvalue">GDBusMessage</span></a> *      g_dbus_connection_send_message_with_reply_sync
                                                        (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GDBusMessage.html#GDBusMessage" title="GDBusMessage"><span class="type">GDBusMessage</span></a> *message</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusSendMessageFlags" title="enum GDBusSendMessageFlags"><span class="type">GDBusSendMessageFlags</span></a> flags</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> timeout_msec</code></em>,
                                                         <em class="parameter"><code>volatile <a href="../glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> *out_serial</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GCancellable.html#GCancellable" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Synchronously sends <em class="parameter"><code>message</code></em> to the peer represented by <em class="parameter"><code>connection</code></em>
and blocks the calling thread until a reply is received or the
timeout is reached. See <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-send-message-with-reply" title="g_dbus_connection_send_message_with_reply ()"><code class="function">g_dbus_connection_send_message_with_reply()</code></a>
for the asynchronous version of this method.
</p>
<p>
Unless <em class="parameter"><code>flags</code></em> contain the
<a class="link" href="gio-GDBusConnection.html#G-DBUS-SEND-MESSAGE-FLAGS-PRESERVE-SERIAL:CAPS"><code class="literal">G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL</code></a> flag, the serial number
will be assigned by <em class="parameter"><code>connection</code></em> and set on <em class="parameter"><code>message</code></em> via
<a class="link" href="gio-GDBusMessage.html#g-dbus-message-set-serial" title="g_dbus_message_set_serial ()"><code class="function">g_dbus_message_set_serial()</code></a>. If <em class="parameter"><code>out_serial</code></em> is not <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the
serial number used will be written to this location prior to
submitting the message to the underlying transport.
</p>
<p>
If <em class="parameter"><code>connection</code></em> is closed then the operation will fail with
<a class="link" href="gio-GIOError.html#G-IO-ERROR-CLOSED:CAPS"><code class="literal">G_IO_ERROR_CLOSED</code></a>. If <em class="parameter"><code>cancellable</code></em> is canceled, the operation will
fail with <a class="link" href="gio-GIOError.html#G-IO-ERROR-CANCELLED:CAPS"><code class="literal">G_IO_ERROR_CANCELLED</code></a>. If <em class="parameter"><code>message</code></em> is not well-formed,
the operation fails with <a class="link" href="gio-GIOError.html#G-IO-ERROR-INVALID-ARGUMENT:CAPS"><code class="literal">G_IO_ERROR_INVALID_ARGUMENT</code></a>.
</p>
<p>
Note that <em class="parameter"><code>error</code></em> is only set if a local in-process error
occured. That is to say that the returned <a class="link" href="gio-GDBusMessage.html#GDBusMessage" title="GDBusMessage"><span class="type">GDBusMessage</span></a> object may
be of type <a class="link" href="gio-GDBusMessage.html#G-DBUS-MESSAGE-TYPE-ERROR:CAPS"><code class="literal">G_DBUS_MESSAGE_TYPE_ERROR</code></a>. Use
<a class="link" href="gio-GDBusMessage.html#g-dbus-message-to-gerror" title="g_dbus_message_to_gerror ()"><code class="function">g_dbus_message_to_gerror()</code></a> to transcode this to a <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>.
</p>
<p>
See <a class="xref" href="gio-GDBusConnection.html#gdbus-server" title="Example 2. D-Bus server example">Example 2, “D-Bus server example”</a> and <a class="xref" href="gio-GDBusConnection.html#gdbus-unix-fd-client" title="Example 4. D-Bus UNIX File Descriptor example">Example 4, “D-Bus UNIX File Descriptor example”</a> for an example of how to use this
low-level API to send and receive UNIX file descriptors.
</p>
<p>
Note that <em class="parameter"><code>message</code></em> must be unlocked, unless <em class="parameter"><code>flags</code></em> contain the
<a class="link" href="gio-GDBusConnection.html#G-DBUS-SEND-MESSAGE-FLAGS-PRESERVE-SERIAL:CAPS"><code class="literal">G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL</code></a> flag.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>message</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusMessage.html#GDBusMessage" title="GDBusMessage"><span class="type">GDBusMessage</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
<td>Flags affecting how the message is sent.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>timeout_msec</code></em> :</span></p></td>
<td>The timeout in milliseconds, -1 to use the default
timeout or <a href="../glib/glib-Limits-of-Basic-Types.html#G-MAXINT:CAPS"><code class="literal">G_MAXINT</code></a> for no timeout.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out_serial</code></em> :</span></p></td>
<td>Return location for serial number assigned to <em class="parameter"><code>message</code></em> when sending it or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GCancellable.html#GCancellable" title="GCancellable"><span class="type">GCancellable</span></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>Return location for error or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A locked <a class="link" href="gio-GDBusMessage.html#GDBusMessage" title="GDBusMessage"><span class="type">GDBusMessage</span></a> that is the reply to <em class="parameter"><code>message</code></em> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>error</code></em> is set. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="GDBusMessageFilterFunction"></a><h3>GDBusMessageFilterFunction ()</h3>
<pre class="programlisting"><a class="link" href="gio-GDBusMessage.html#GDBusMessage" title="GDBusMessage"><span class="returnvalue">GDBusMessage</span></a> *      (*GDBusMessageFilterFunction)       (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GDBusMessage.html#GDBusMessage" title="GDBusMessage"><span class="type">GDBusMessage</span></a> *message</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> incoming</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>
Signature for function used in <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-add-filter" title="g_dbus_connection_add_filter ()"><code class="function">g_dbus_connection_add_filter()</code></a>.
</p>
<p>
A filter function is passed a <a class="link" href="gio-GDBusMessage.html#GDBusMessage" title="GDBusMessage"><span class="type">GDBusMessage</span></a> and expected to return
a <a class="link" href="gio-GDBusMessage.html#GDBusMessage" title="GDBusMessage"><span class="type">GDBusMessage</span></a> too. Passive filter functions that don't modify the
message can simply return the <em class="parameter"><code>message</code></em> object:
</p>
<div class="informalexample"><pre class="programlisting">
static GDBusMessage *
passive_filter (GDBusConnection *connection
                GDBusMessage    *message,
                gboolean         incoming,
                gpointer         user_data)
{
  /* inspect @message */
  return message;
}
</pre></div>
<p>
Filter functions that wants to drop a message can simply return <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>:
</p>
<div class="informalexample"><pre class="programlisting">
static GDBusMessage *
drop_filter (GDBusConnection *connection
             GDBusMessage    *message,
             gboolean         incoming,
             gpointer         user_data)
{
  if (should_drop_message)
    {
      g_object_unref (message);
      message = NULL;
    }
  return message;
}
</pre></div>
<p>
Finally, a filter function may modify a message by copying it:
</p>
<div class="informalexample"><pre class="programlisting">
static GDBusMessage *
modifying_filter (GDBusConnection *connection
                  GDBusMessage    *message,
                  gboolean         incoming,
                  gpointer         user_data)
{
  GDBusMessage *copy;
  GError *error;

  error = NULL;
  copy = g_dbus_message_copy (message, &amp;error);
  /* handle @error being is set */
  g_object_unref (message);

  /* modify @copy */

  return copy;
}
</pre></div>
<p>
If the returned <a class="link" href="gio-GDBusMessage.html#GDBusMessage" title="GDBusMessage"><span class="type">GDBusMessage</span></a> is different from <em class="parameter"><code>message</code></em> and cannot
be sent on <em class="parameter"><code>connection</code></em> (it could use features, such as file
descriptors, not compatible with <em class="parameter"><code>connection</code></em>), then a warning is
logged to <span class="emphasis"><em>standard error</em></span>. Applications can
check this ahead of time using <a class="link" href="gio-GDBusMessage.html#g-dbus-message-to-blob" title="g_dbus_message_to_blob ()"><code class="function">g_dbus_message_to_blob()</code></a> passing a
<a class="link" href="gio-GDBusConnection.html#GDBusCapabilityFlags" title="enum GDBusCapabilityFlags"><span class="type">GDBusCapabilityFlags</span></a> value obtained from <em class="parameter"><code>connection</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>message</code></em> :</span></p></td>
<td>A locked <a class="link" href="gio-GDBusMessage.html#GDBusMessage" title="GDBusMessage"><span class="type">GDBusMessage</span></a> that the filter function takes ownership of. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>incoming</code></em> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if it is a message received from the other peer, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if it is
a message to be sent to the other peer.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>User data passed when adding the filter.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A <a class="link" href="gio-GDBusMessage.html#GDBusMessage" title="GDBusMessage"><span class="type">GDBusMessage</span></a> that will be freed with
<a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to drop the message. Passive filter
functions can simply return the passed <em class="parameter"><code>message</code></em> object. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-add-filter"></a><h3>g_dbus_connection_add_filter ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               g_dbus_connection_add_filter        (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusMessageFilterFunction" title="GDBusMessageFilterFunction ()"><span class="type">GDBusMessageFilterFunction</span></a> filter_function</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> user_data_free_func</code></em>);</pre>
<p>
Adds a message filter. Filters are handlers that are run on all
incoming and outgoing messages, prior to standard dispatch. Filters
are run in the order that they were added.  The same handler can be
added as a filter more than once, in which case it will be run more
than once.  Filters added during a filter callback won't be run on
the message being processed. Filter functions are allowed to modify
and even drop messages - see the <span class="type">GDBusMessageFilterResult</span>
enumeration for details.
</p>
<p>
Note that filters are run in a dedicated message handling thread so
they can't block and, generally, can't do anything but signal a
worker thread. Also note that filters are rarely needed - use API
such as <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-send-message-with-reply" title="g_dbus_connection_send_message_with_reply ()"><code class="function">g_dbus_connection_send_message_with_reply()</code></a>,
<a class="link" href="gio-GDBusConnection.html#g-dbus-connection-signal-subscribe" title="g_dbus_connection_signal_subscribe ()"><code class="function">g_dbus_connection_signal_subscribe()</code></a> or
<a class="link" href="gio-GDBusConnection.html#g-dbus-connection-call" title="g_dbus_connection_call ()"><code class="function">g_dbus_connection_call()</code></a> instead.
</p>
<p>
If a filter consumes an incoming message the message is not
dispatched anywhere else - not even the standard dispatch machinery
(that API such as <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-signal-subscribe" title="g_dbus_connection_signal_subscribe ()"><code class="function">g_dbus_connection_signal_subscribe()</code></a> and
<a class="link" href="gio-GDBusConnection.html#g-dbus-connection-send-message-with-reply" title="g_dbus_connection_send_message_with_reply ()"><code class="function">g_dbus_connection_send_message_with_reply()</code></a> relies on) will see the
message. Similary, if a filter consumes an outgoing message, the
message will not be sent to the other peer.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>filter_function</code></em> :</span></p></td>
<td>A filter function.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>User data to pass to <em class="parameter"><code>filter_function</code></em>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data_free_func</code></em> :</span></p></td>
<td>Function to free <em class="parameter"><code>user_data</code></em> with when filter
is removed or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A filter identifier that can be used with
<a class="link" href="gio-GDBusConnection.html#g-dbus-connection-remove-filter" title="g_dbus_connection_remove_filter ()"><code class="function">g_dbus_connection_remove_filter()</code></a>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-remove-filter"></a><h3>g_dbus_connection_remove_filter ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_dbus_connection_remove_filter     (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> filter_id</code></em>);</pre>
<p>
Removes a filter.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>a <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>filter_id</code></em> :</span></p></td>
<td>an identifier obtained from <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-add-filter" title="g_dbus_connection_add_filter ()"><code class="function">g_dbus_connection_add_filter()</code></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="GDBusInterfaceVTable"></a><h3>GDBusInterfaceVTable</h3>
<pre class="programlisting">typedef struct {
  GDBusInterfaceMethodCallFunc  method_call;
  GDBusInterfaceGetPropertyFunc get_property;
  GDBusInterfaceSetPropertyFunc set_property;
} GDBusInterfaceVTable;
</pre>
<p>
Virtual table for handling properties and method calls for a D-Bus
interface.
</p>
<p>
If you want to handle getting/setting D-Bus properties asynchronously, simply
register an object with the <code class="literal">org.freedesktop.DBus.Properties</code>
D-Bus interface using <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-register-object" title="g_dbus_connection_register_object ()"><code class="function">g_dbus_connection_register_object()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><a class="link" href="gio-GDBusConnection.html#GDBusInterfaceMethodCallFunc" title="GDBusInterfaceMethodCallFunc ()"><span class="type">GDBusInterfaceMethodCallFunc</span></a> <em class="structfield"><code><a name="GDBusInterfaceVTable.method-call"></a>method_call</code></em>;</span></p></td>
<td>Function for handling incoming method calls.</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="gio-GDBusConnection.html#GDBusInterfaceGetPropertyFunc" title="GDBusInterfaceGetPropertyFunc ()"><span class="type">GDBusInterfaceGetPropertyFunc</span></a> <em class="structfield"><code><a name="GDBusInterfaceVTable.get-property"></a>get_property</code></em>;</span></p></td>
<td>Function for getting a property.</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="gio-GDBusConnection.html#GDBusInterfaceSetPropertyFunc" title="GDBusInterfaceSetPropertyFunc ()"><span class="type">GDBusInterfaceSetPropertyFunc</span></a> <em class="structfield"><code><a name="GDBusInterfaceVTable.set-property"></a>set_property</code></em>;</span></p></td>
<td>Function for setting a property.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="GDBusInterfaceMethodCallFunc"></a><h3>GDBusInterfaceMethodCallFunc ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                (*GDBusInterfaceMethodCallFunc)     (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *sender</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *object_path</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *interface_name</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *method_name</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *parameters</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a> *invocation</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>
The type of the <em class="parameter"><code>method_call</code></em> function in <a class="link" href="gio-GDBusConnection.html#GDBusInterfaceVTable" title="GDBusInterfaceVTable"><span class="type">GDBusInterfaceVTable</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>sender</code></em> :</span></p></td>
<td>The unique bus name of the remote caller.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>object_path</code></em> :</span></p></td>
<td>The object path that the method was invoked on.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>interface_name</code></em> :</span></p></td>
<td>The D-Bus interface name the method was invoked on.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>method_name</code></em> :</span></p></td>
<td>The name of the method that was invoked.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>parameters</code></em> :</span></p></td>
<td>A <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> tuple with parameters.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>invocation</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a> object that can be used to return a value or error.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>The <em class="parameter"><code>user_data</code></em> <a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> passed to <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-register-object" title="g_dbus_connection_register_object ()"><code class="function">g_dbus_connection_register_object()</code></a>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="GDBusInterfaceGetPropertyFunc"></a><h3>GDBusInterfaceGetPropertyFunc ()</h3>
<pre class="programlisting"><a href="../glib/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *          (*GDBusInterfaceGetPropertyFunc)    (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *sender</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *object_path</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *interface_name</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *property_name</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>
The type of the <em class="parameter"><code>get_property</code></em> function in <a class="link" href="gio-GDBusConnection.html#GDBusInterfaceVTable" title="GDBusInterfaceVTable"><span class="type">GDBusInterfaceVTable</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>sender</code></em> :</span></p></td>
<td>The unique bus name of the remote caller.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>object_path</code></em> :</span></p></td>
<td>The object path that the method was invoked on.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>interface_name</code></em> :</span></p></td>
<td>The D-Bus interface name for the property.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>property_name</code></em> :</span></p></td>
<td>The name of the property to get the value of.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>Return location for error.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>The <em class="parameter"><code>user_data</code></em> <a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> passed to <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-register-object" title="g_dbus_connection_register_object ()"><code class="function">g_dbus_connection_register_object()</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> with the value for <em class="parameter"><code>property_name</code></em> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if
<em class="parameter"><code>error</code></em> is set. If the returned <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> is floating, it is
consumed - otherwise its reference count is decreased by one.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="GDBusInterfaceSetPropertyFunc"></a><h3>GDBusInterfaceSetPropertyFunc ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            (*GDBusInterfaceSetPropertyFunc)    (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *sender</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *object_path</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *interface_name</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *property_name</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *value</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>
The type of the <em class="parameter"><code>set_property</code></em> function in <a class="link" href="gio-GDBusConnection.html#GDBusInterfaceVTable" title="GDBusInterfaceVTable"><span class="type">GDBusInterfaceVTable</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>sender</code></em> :</span></p></td>
<td>The unique bus name of the remote caller.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>object_path</code></em> :</span></p></td>
<td>The object path that the method was invoked on.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>interface_name</code></em> :</span></p></td>
<td>The D-Bus interface name for the property.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>property_name</code></em> :</span></p></td>
<td>The name of the property to get the value of.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>The value to set the property to.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>Return location for error.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>The <em class="parameter"><code>user_data</code></em> <a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> passed to <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-register-object" title="g_dbus_connection_register_object ()"><code class="function">g_dbus_connection_register_object()</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the property was set to <em class="parameter"><code>value</code></em>, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if <em class="parameter"><code>error</code></em> is set.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-register-object"></a><h3>g_dbus_connection_register_object ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               g_dbus_connection_register_object   (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *object_path</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-D-Bus-Introspection-Data.html#GDBusInterfaceInfo" title="GDBusInterfaceInfo"><span class="type">GDBusInterfaceInfo</span></a> *interface_info</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="gio-GDBusConnection.html#GDBusInterfaceVTable" title="GDBusInterfaceVTable"><span class="type">GDBusInterfaceVTable</span></a> *vtable</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> user_data_free_func</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Registers callbacks for exported objects at <em class="parameter"><code>object_path</code></em> with the
D-Bus interface that is described in <em class="parameter"><code>interface_info</code></em>.
</p>
<p>
Calls to functions in <em class="parameter"><code>vtable</code></em> (and <em class="parameter"><code>user_data_free_func</code></em>) will
happen in the <GTKDOCLINK HREF="g-main-context-push-thread-default">thread-default main
loop</GTKDOCLINK> of the thread you are calling this method from.
</p>
<p>
Note that all <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> values passed to functions in <em class="parameter"><code>vtable</code></em> will match
the signature given in <em class="parameter"><code>interface_info</code></em> - if a remote caller passes
incorrect values, the <code class="literal">org.freedesktop.DBus.Error.InvalidArgs</code>
is returned to the remote caller.
</p>
<p>
Additionally, if the remote caller attempts to invoke methods or
access properties not mentioned in <em class="parameter"><code>interface_info</code></em> the
<code class="literal">org.freedesktop.DBus.Error.UnknownMethod</code> resp.
<code class="literal">org.freedesktop.DBus.Error.InvalidArgs</code> errors
are returned to the caller.
</p>
<p>
It is considered a programming error if the
<a class="link" href="gio-GDBusConnection.html#GDBusInterfaceGetPropertyFunc" title="GDBusInterfaceGetPropertyFunc ()"><span class="type">GDBusInterfaceGetPropertyFunc</span></a> function in <em class="parameter"><code>vtable</code></em> returns a
<a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of incorrect type.
</p>
<p>
If an existing callback is already registered at <em class="parameter"><code>object_path</code></em> and
<em class="parameter"><code>interface_name</code></em>, then <em class="parameter"><code>error</code></em> is set to <a class="link" href="gio-GIOError.html#G-IO-ERROR-EXISTS:CAPS"><span class="type">G_IO_ERROR_EXISTS</span></a>.
</p>
<p>
GDBus automatically implements the standard D-Bus interfaces
org.freedesktop.DBus.Properties, org.freedesktop.DBus.Introspectable
and org.freedesktop.Peer, so you don't have to implement those for
the objects you export. You <span class="emphasis"><em>can</em></span> implement
org.freedesktop.DBus.Properties yourself, e.g. to handle getting
and setting of properties asynchronously.
</p>
<p>
Note that the reference count on <em class="parameter"><code>interface_info</code></em> will be
incremented by 1 (unless allocated statically, e.g. if the
reference count is -1, see <a class="link" href="gio-D-Bus-Introspection-Data.html#g-dbus-interface-info-ref" title="g_dbus_interface_info_ref ()"><code class="function">g_dbus_interface_info_ref()</code></a>) for as long
as the object is exported. Also note that <em class="parameter"><code>vtable</code></em> will be copied.
</p>
<p>
A <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> <em class="parameter"><code>vtable</code></em> can be used for
<a class="ulink" href="http://en.wikipedia.org/wiki/Marker_interface_pattern" target="_top">marker
interfaces</a>.
</p>
<p>
See <a class="xref" href="gio-GDBusConnection.html#gdbus-server" title="Example 2. D-Bus server example">Example 2, “D-Bus server example”</a> for an example of how to use this
method.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>object_path</code></em> :</span></p></td>
<td>The object path to register at</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>interface_info</code></em> :</span></p></td>
<td>Introspection data for the interface</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>vtable</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusConnection.html#GDBusInterfaceVTable" title="GDBusInterfaceVTable"><span class="type">GDBusInterfaceVTable</span></a> to call into, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>Data to pass to functions in <em class="parameter"><code>vtable</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data_free_func</code></em> :</span></p></td>
<td>Function to call when the object path is unregistered</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>Return location for error or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 if <em class="parameter"><code>error</code></em> is set, otherwise a registration id (never 0)
that can be used with <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-unregister-object" title="g_dbus_connection_unregister_object ()"><code class="function">g_dbus_connection_unregister_object()</code></a> .</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-unregister-object"></a><h3>g_dbus_connection_unregister_object ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            g_dbus_connection_unregister_object (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> registration_id</code></em>);</pre>
<p>
Unregisters an object.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>registration_id</code></em> :</span></p></td>
<td>A registration id obtained from <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-register-object" title="g_dbus_connection_register_object ()"><code class="function">g_dbus_connection_register_object()</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the object was unregistered, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="GDBusSubtreeVTable"></a><h3>GDBusSubtreeVTable</h3>
<pre class="programlisting">typedef struct {
  GDBusSubtreeEnumerateFunc  enumerate;
  GDBusSubtreeIntrospectFunc introspect;
  GDBusSubtreeDispatchFunc   dispatch;
} GDBusSubtreeVTable;
</pre>
<p>
Virtual table for handling subtrees registered with <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-register-subtree" title="g_dbus_connection_register_subtree ()"><code class="function">g_dbus_connection_register_subtree()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><a class="link" href="gio-GDBusConnection.html#GDBusSubtreeEnumerateFunc" title="GDBusSubtreeEnumerateFunc ()"><span class="type">GDBusSubtreeEnumerateFunc</span></a> <em class="structfield"><code><a name="GDBusSubtreeVTable.enumerate"></a>enumerate</code></em>;</span></p></td>
<td>Function for enumerating child nodes.</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="gio-GDBusConnection.html#GDBusSubtreeIntrospectFunc" title="GDBusSubtreeIntrospectFunc ()"><span class="type">GDBusSubtreeIntrospectFunc</span></a> <em class="structfield"><code><a name="GDBusSubtreeVTable.introspect"></a>introspect</code></em>;</span></p></td>
<td>Function for introspecting a child node.</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="gio-GDBusConnection.html#GDBusSubtreeDispatchFunc" title="GDBusSubtreeDispatchFunc ()"><span class="type">GDBusSubtreeDispatchFunc</span></a> <em class="structfield"><code><a name="GDBusSubtreeVTable.dispatch"></a>dispatch</code></em>;</span></p></td>
<td>Function for dispatching a remote call on a child node.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="GDBusSubtreeEnumerateFunc"></a><h3>GDBusSubtreeEnumerateFunc ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> **            (*GDBusSubtreeEnumerateFunc)        (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *sender</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *object_path</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>
The type of the <em class="parameter"><code>enumerate</code></em> function in <a class="link" href="gio-GDBusConnection.html#GDBusSubtreeVTable" title="GDBusSubtreeVTable"><span class="type">GDBusSubtreeVTable</span></a>.
</p>
<p>
This function is called when generating introspection data and also
when preparing to dispatch incoming messages in the event that the
<a class="link" href="gio-GDBusConnection.html#G-DBUS-SUBTREE-FLAGS-DISPATCH-TO-UNENUMERATED-NODES:CAPS"><code class="literal">G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES</code></a> flag is not
specified (ie: to verify that the object path is valid).
</p>
<p>
Hierarchies are not supported; the items that you return should not
contain the '/' character.
</p>
<p>
The return value will be freed with <a href="../glib/glib-String-Utility-Functions.html#g-strfreev"><code class="function">g_strfreev()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>sender</code></em> :</span></p></td>
<td>The unique bus name of the remote caller.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>object_path</code></em> :</span></p></td>
<td>The object path that was registered with <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-register-subtree" title="g_dbus_connection_register_subtree ()"><code class="function">g_dbus_connection_register_subtree()</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>The <em class="parameter"><code>user_data</code></em> <a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> passed to <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-register-subtree" title="g_dbus_connection_register_subtree ()"><code class="function">g_dbus_connection_register_subtree()</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A newly allocated array of strings for node names that are children of <em class="parameter"><code>object_path</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="GDBusSubtreeIntrospectFunc"></a><h3>GDBusSubtreeIntrospectFunc ()</h3>
<pre class="programlisting"><a class="link" href="gio-D-Bus-Introspection-Data.html#GDBusInterfaceInfo" title="GDBusInterfaceInfo"><span class="returnvalue">GDBusInterfaceInfo</span></a> ** (*GDBusSubtreeIntrospectFunc)     (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *sender</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *object_path</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *node</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>
The type of the <em class="parameter"><code>introspect</code></em> function in <a class="link" href="gio-GDBusConnection.html#GDBusSubtreeVTable" title="GDBusSubtreeVTable"><span class="type">GDBusSubtreeVTable</span></a>.
</p>
<p>
Subtrees are flat.  <em class="parameter"><code>node</code></em>, if non-<a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, is always exactly one
segment of the object path (ie: it never contains a slash).
</p>
<p>
This function should return <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to indicate that there is no object
at this node.
</p>
<p>
If this function returns non-<a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, the return value is expected to
be a <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated array of pointers to <a class="link" href="gio-D-Bus-Introspection-Data.html#GDBusInterfaceInfo" title="GDBusInterfaceInfo"><span class="type">GDBusInterfaceInfo</span></a>
structures describing the interfaces implemented by <em class="parameter"><code>node</code></em>.  This
array will have <a class="link" href="gio-D-Bus-Introspection-Data.html#g-dbus-interface-info-unref" title="g_dbus_interface_info_unref ()"><code class="function">g_dbus_interface_info_unref()</code></a> called on each item
before being freed with <a href="../glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>.
</p>
<p>
The difference between returning <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> and an array containing zero
items is that the standard DBus interfaces will returned to the
remote introspector in the empty array case, but not in the <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
case.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>sender</code></em> :</span></p></td>
<td>The unique bus name of the remote caller.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>object_path</code></em> :</span></p></td>
<td>The object path that was registered with <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-register-subtree" title="g_dbus_connection_register_subtree ()"><code class="function">g_dbus_connection_register_subtree()</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>node</code></em> :</span></p></td>
<td>A node that is a child of <em class="parameter"><code>object_path</code></em> (relative to <em class="parameter"><code>object_path</code></em>) or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> for the root of the subtree.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>The <em class="parameter"><code>user_data</code></em> <a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> passed to <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-register-subtree" title="g_dbus_connection_register_subtree ()"><code class="function">g_dbus_connection_register_subtree()</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated array of pointers to <a class="link" href="gio-D-Bus-Introspection-Data.html#GDBusInterfaceInfo" title="GDBusInterfaceInfo"><span class="type">GDBusInterfaceInfo</span></a>, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="GDBusSubtreeDispatchFunc"></a><h3>GDBusSubtreeDispatchFunc ()</h3>
<pre class="programlisting">const <a class="link" href="gio-GDBusConnection.html#GDBusInterfaceVTable" title="GDBusInterfaceVTable"><span class="returnvalue">GDBusInterfaceVTable</span></a> * (*GDBusSubtreeDispatchFunc)
                                                        (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *sender</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *object_path</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *interface_name</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *node</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> *out_user_data</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>
The type of the <em class="parameter"><code>dispatch</code></em> function in <a class="link" href="gio-GDBusConnection.html#GDBusSubtreeVTable" title="GDBusSubtreeVTable"><span class="type">GDBusSubtreeVTable</span></a>.
</p>
<p>
Subtrees are flat.  <em class="parameter"><code>node</code></em>, if non-<a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, is always exactly one
segment of the object path (ie: it never contains a slash).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>sender</code></em> :</span></p></td>
<td>The unique bus name of the remote caller.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>object_path</code></em> :</span></p></td>
<td>The object path that was registered with <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-register-subtree" title="g_dbus_connection_register_subtree ()"><code class="function">g_dbus_connection_register_subtree()</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>interface_name</code></em> :</span></p></td>
<td>The D-Bus interface name that the method call or property access is for.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>node</code></em> :</span></p></td>
<td>A node that is a child of <em class="parameter"><code>object_path</code></em> (relative to <em class="parameter"><code>object_path</code></em>) or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> for the root of the subtree.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out_user_data</code></em> :</span></p></td>
<td>Return location for user data to pass to functions in the returned <a class="link" href="gio-GDBusConnection.html#GDBusInterfaceVTable" title="GDBusInterfaceVTable"><span class="type">GDBusInterfaceVTable</span></a> (never <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>).</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>The <em class="parameter"><code>user_data</code></em> <a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> passed to <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-register-subtree" title="g_dbus_connection_register_subtree ()"><code class="function">g_dbus_connection_register_subtree()</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A <a class="link" href="gio-GDBusConnection.html#GDBusInterfaceVTable" title="GDBusInterfaceVTable"><span class="type">GDBusInterfaceVTable</span></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if you don't want to handle the methods.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="GDBusSubtreeFlags"></a><h3>enum GDBusSubtreeFlags</h3>
<pre class="programlisting">typedef enum
{
  G_DBUS_SUBTREE_FLAGS_NONE = 0,
  G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES = (1&lt;&lt;0)
} GDBusSubtreeFlags;
</pre>
<p>
Flags passed to <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-register-subtree" title="g_dbus_connection_register_subtree ()"><code class="function">g_dbus_connection_register_subtree()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="G-DBUS-SUBTREE-FLAGS-NONE:CAPS"></a><span class="term"><code class="literal">G_DBUS_SUBTREE_FLAGS_NONE</code></span></p></td>
<td>No flags set.
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-SUBTREE-FLAGS-DISPATCH-TO-UNENUMERATED-NODES:CAPS"></a><span class="term"><code class="literal">G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES</code></span></p></td>
<td>Method calls to objects not in the enumerated range
                                                      will still be dispatched. This is useful if you want
                                                      to dynamically spawn objects in the subtree.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-register-subtree"></a><h3>g_dbus_connection_register_subtree ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               g_dbus_connection_register_subtree  (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *object_path</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="gio-GDBusConnection.html#GDBusSubtreeVTable" title="GDBusSubtreeVTable"><span class="type">GDBusSubtreeVTable</span></a> *vtable</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusSubtreeFlags" title="enum GDBusSubtreeFlags"><span class="type">GDBusSubtreeFlags</span></a> flags</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> user_data_free_func</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Registers a whole subtree of <span class="quote">“<span class="quote">dynamic</span>”</span> objects.
</p>
<p>
The <em class="parameter"><code>enumerate</code></em> and <em class="parameter"><code>introspection</code></em> functions in <em class="parameter"><code>vtable</code></em> are used to
convey, to remote callers, what nodes exist in the subtree rooted
by <em class="parameter"><code>object_path</code></em>.
</p>
<p>
When handling remote calls into any node in the subtree, first the
<em class="parameter"><code>enumerate</code></em> function is used to check if the node exists. If the node exists
or the <a class="link" href="gio-GDBusConnection.html#G-DBUS-SUBTREE-FLAGS-DISPATCH-TO-UNENUMERATED-NODES:CAPS"><span class="type">G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES</span></a> flag is set
the <em class="parameter"><code>introspection</code></em> function is used to check if the node supports the
requested method. If so, the <em class="parameter"><code>dispatch</code></em> function is used to determine
where to dispatch the call. The collected <a class="link" href="gio-GDBusConnection.html#GDBusInterfaceVTable" title="GDBusInterfaceVTable"><span class="type">GDBusInterfaceVTable</span></a> and
<a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> will be used to call into the interface vtable for processing
the request.
</p>
<p>
All calls into user-provided code will be invoked in the <GTKDOCLINK HREF="g-main-context-push-thread-default">thread-default main
loop</GTKDOCLINK> of the thread you are calling this method from.
</p>
<p>
If an existing subtree is already registered at <em class="parameter"><code>object_path</code></em> or
then <em class="parameter"><code>error</code></em> is set to <a class="link" href="gio-GIOError.html#G-IO-ERROR-EXISTS:CAPS"><span class="type">G_IO_ERROR_EXISTS</span></a>.
</p>
<p>
Note that it is valid to register regular objects (using
<a class="link" href="gio-GDBusConnection.html#g-dbus-connection-register-object" title="g_dbus_connection_register_object ()"><code class="function">g_dbus_connection_register_object()</code></a>) in a subtree registered with
<a class="link" href="gio-GDBusConnection.html#g-dbus-connection-register-subtree" title="g_dbus_connection_register_subtree ()"><code class="function">g_dbus_connection_register_subtree()</code></a> - if so, the subtree handler
is tried as the last resort. One way to think about a subtree
handler is to consider it a <span class="quote">“<span class="quote">fallback handler</span>”</span>
for object paths not registered via <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-register-object" title="g_dbus_connection_register_object ()"><code class="function">g_dbus_connection_register_object()</code></a>
or other bindings.
</p>
<p>
Note that <em class="parameter"><code>vtable</code></em> will be copied so you cannot change it after
registration.
</p>
<p>
See <a class="xref" href="gio-GDBusConnection.html#gdbus-subtree-server" title="Example 3. D-Bus subtree example">Example 3, “D-Bus subtree example”</a> for an example of how to use this method.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>object_path</code></em> :</span></p></td>
<td>The object path to register the subtree at.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>vtable</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusConnection.html#GDBusSubtreeVTable" title="GDBusSubtreeVTable"><span class="type">GDBusSubtreeVTable</span></a> to enumerate, introspect and dispatch nodes in the subtree.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
<td>Flags used to fine tune the behavior of the subtree.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>Data to pass to functions in <em class="parameter"><code>vtable</code></em>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data_free_func</code></em> :</span></p></td>
<td>Function to call when the subtree is unregistered.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>Return location for error or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 if <em class="parameter"><code>error</code></em> is set, otherwise a subtree registration id (never 0)
that can be used with <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-unregister-subtree" title="g_dbus_connection_unregister_subtree ()"><code class="function">g_dbus_connection_unregister_subtree()</code></a> .</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-unregister-subtree"></a><h3>g_dbus_connection_unregister_subtree ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            g_dbus_connection_unregister_subtree
                                                        (<em class="parameter"><code><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> registration_id</code></em>);</pre>
<p>
Unregisters a subtree.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>registration_id</code></em> :</span></p></td>
<td>A subtree registration id obtained from <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-register-subtree" title="g_dbus_connection_register_subtree ()"><code class="function">g_dbus_connection_register_subtree()</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the subtree was unregistered, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.17</div>
</body>
</html>